Video game using dual motion sensing controllers

ABSTRACT

An inclination of a first unit is detected based on an output from a first acceleration sensor provided in a first unit of a controller, and an inclination of a second unit is detected based on an output from a second acceleration sensor provided in a second unit separate from the first unit. A difference between the inclinations of the first unit and the second unit is detected, and game control is performed using the detected difference. Thus, with a game apparatus using a plurality of acceleration sensors or a plurality of sensors capable of detecting a motion or a posture, a dynamic play is made possible with a high degree of freedom of motion and an intuitive motion input is realized.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a divisional of U.S. application Ser. No.13/103,127, filed May 9, 2011, which is a divisional of U.S. applicationSer. No. 11/790,893, filed Apr. 27, 2007, which claims the benefit ofJapanese Patent Application No. 2006-127384, filed on May 1, 2006, eachof which is incorporated herein in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Technology

The technology presented herein relates to a game program and a gameapparatus for executing game control by a plurality of accelerationsensors or a plurality of sensors capable of detecting a motion or aposture.

2. Description of the Background Art

Japanese Laid-Open Patent Publication No. 10-21000 (hereinafter,referred to as “patent document 1”) discloses providing two accelerationsensors (for measuring accelerations along different axes or formeasuring a straight line and a rotation) in one housing.

Japanese Laid-Open Patent Publication No. 2002-153673 (hereinafter,referred to as “patent document 2”) discloses a technology forperforming different game inputs using two acceleration sensors.

Japanese Laid-Open Patent Publication No. 6-277363 (hereinafter,referred to as “patent document 3”) discloses a technology for using twolevers as controllers.

Japanese Laid-Open Patent Publication No. 2001-170358 (hereinafter,referred to as “patent document 4”) discloses a technology for setting aneutral position.

The technology disclosed in patent document 1 has a problem in that themotions of both hands of the player are fixed, and thus the freedom ofmotion of the player during the game play is limited (the player cannotperform a dynamic play).

The technology disclosed in patent document 2 merely allows separateinputs made using two acceleration sensors to be used for the game asindependent inputs, which does not provide the game operation with anyentertainment.

The technology disclosed in patent document 3 has a problem in that thefreedom of motion of the player during the game play is limited.

The technology disclosed in patent document 4 is regarding one sensorand is not for setting a neutral position in a system including aplurality of sensors.

None of these technologies effectively uses the motion in a plurality ofdirections detected by a sensor.

The present technology is provided for solving at least one of theabove-described problems.

SUMMARY

Therefore, a feature of the present invention is at least one of thefollowing.

(1) To provide a game program and a game apparatus for, when executinggame control during a game by a plurality of acceleration sensors or aplurality of sensors capable of detecting a motion or a posture,allowing the player to make a dynamic game input operation with a highdegree of freedom of motion;

(2) To provide a game program and a game apparatus for allowingappropriate setting of a neutral position when executing game control bya plurality of sensors; and

(3) To provide a game program and a game apparatus which effectively usea plurality of directions detected by a plurality of sensors capable ofdetecting a motion.

The present technology has the following features to attain the above.The reference numerals in parentheses in this section of thespecification indicate the correspondence with the embodiments describedlater for easier understanding of the present technology, and do notlimit the present technology in any way.

A computer-readable storage medium according to one embodiment hasstored thereon a game program for executing game control using an outputfrom a first sensor (701) which is an acceleration sensor or agyrosensor provided in a first housing (71) and an output from a secondsensor (761) which is an acceleration sensor or a gyrosensor provided ina second housing (77) separate from the first housing. The game programcauses a computer (30) of a game apparatus (3) to function as:

first posture detection means for detecting a posture of the firsthousing based on an output from the first sensor (S104);

second posture detection means for detecting a posture of the secondhousing based on an output from the second sensor (S108);

posture difference detection means for detecting a difference betweenthe posture of the first housing detected by the first posture detectionmeans and the posture of the second housing detected by the secondposture detection means (S116); and

game control means for executing game control using the differencedetected by the posture difference detection means (S118).

Owing to the above-described structure, the player can freely move bothof his/her hands during the play. Therefore, a dynamic play is madepossible with a high degree of freedom of motion. Since the control isexecuted by a posture difference, an intuitive motion input is allowed.

The game program may further cause the computer to function as postureaverage detection means for detecting an average of the posture of thefirst housing detected by the first posture detection means and theposture of the second housing detected by the second posture detectionmeans (S124); and

the game control means may execute the game control using both thedifference detected by the posture difference detection means and theaverage detected by the posture average detection means (S126).

Owing to the above-described structure, the player can perform the gamecontrol freely with the motion of both hands.

For example, a first motion of a game object may be controlled based onthe difference, and a second motion of the game object may be controlledbased on the average. The “posture difference” may be, for example, adifference in the angle of rotation around a predetermined axis or adifference in the angle of rotation around a respective axis.

The game control means may comprise first motion control means forcontrolling a first motion of a game object using the differencedetected by the posture difference detection means (S118); and

the game program may further cause the computer to function as secondmotion control means for controlling a second motion of the game objectbased an output from a switch provided in the first housing or thesecond housing (S164).

Owing to the above-described structure, the degree of freedom of postureduring the play is improved.

The first sensor usable for detecting the posture of the first housingand the second sensor usable for detecting the posture of the secondhousing may be acceleration sensors;

the first posture detection means may detect an inclination of the firsthousing, and the second posture detection means may detect aninclination of the second housing;

the first posture detection means may comprise first housing statedetermination means for determining whether or not the first housing isin a still state based on an output from the first sensor (S156);

when the first housing state determination means determines that thefirst housing is in a still state, the first posture detection means mayoutput the inclination of the first housing detected based on the outputfrom the first sensor as a valid detection result (S158);

the second posture detection means may comprise second housing statedetermination means for determining whether or not the second housing isin a still state based on an output from the second sensor (S156); and

when the second housing state determination means determines that thesecond housing is in a still state, the second posture detection meansmay output the inclination of the second housing detected based on theoutput from the second sensor as a valid detection result (S158).

Owing to the above-described structure, a sensor output due to aninadvertent motion during the play can be eliminated with certainty.

The housing state determination means determines that the housing is ina still state when, for example, the magnitude of the output vector fromthe acceleration sensor substantially matches the magnitude of theoutput vector obtained when the acceleration sensor detects only thegravity (with some extent of a tolerable error).

Only when the first housing state determination means determines thatthe first housing is in a still state and also the second housing statedetermination means determines that the second housing is in a stillstate, the game control means may execute the game control using thedifference detected by the posture difference detection means.

A computer-readable storage medium according to another embodiment hasstored thereon a game program for executing game processing using anoutput from a first sensor (701) which is an acceleration sensor or agyrosensor provided in a first housing (71) and an output from a secondsensor (761) which is an acceleration sensor or a gyrosensor provided ina second housing (77) separate from the first housing. The game programcauses a computer (30) of a game apparatus (3) to function as:

direction determination means for determining a direction of a gamecontrol vector based on an output from the first sensor (S410);

magnitude determination means for determining a magnitude of the gamecontrol vector based on an output from the second sensor (S414); and

game control means for executing game control using the game controlvector, the direction and the magnitude of which are determined by thedirection determination means and the magnitude determination means(S418).

Owing to the above-described structure, the player can freely move bothof his/her hands during the play. Therefore, a dynamic play is madepossible with a high degree of freedom of motion.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game processing using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion and an output from a second sensor (761)provided in a second housing (77) separate from the first housing andcapable of detecting a motion. The game program causes a computer (30)of a game apparatus (3) to function as:

first motion operation detection means for detecting a motion of thefirst housing based on an output from the first sensor (S236);

second motion operation detection means for detecting a motion of thesecond housing based on an output from the second sensor (S250);

simultaneous input detection means for detecting, based on the detectionresults of the first motion operation detection means and the secondmotion operation detection means, whether or not a motion of the secondhousing was detected within a simultaneous input acceptance time periodwhich is counted from a timing determined in relation with the detectionof a motion of the first housing (S254); and

game control means for executing first game processing when thesimultaneous input detection means detects that the motion of the secondhousing was detected within the simultaneous input acceptance timeperiod after the motion of the first housing was detected (S256).

Owing to the above-described structure, the simultaneous motionoperations can be used for the game input (with a timing differencebetween the simultaneous motion operations being tolerated).

The simultaneous input acceptance time period is a predetermined timeperiod which is counted from a timing determined in relation with thedetection of the motion of the first housing, and may be fixed orvariable in accordance with the state or level of the game. The “timingwhich is determined in relation with the detection of the motion” is apredetermined timing during an input of a motion which is a target ofdetection; and is, for example, a time point at which such a motion wasdetected or a predetermined time point during such a motion to bedetected (e.g., the start point or the end point of such a motion or apredetermined intermediate point during such a motion).

The first game processing may be executed as follows. The simultaneousinput detection means detects, based on the detection results of thefirst motion operation detection means and the second motion operationdetection means, whether or not a motion of the first housing wasdetected within a simultaneous input acceptance time period after themotion of the second housing was detected. When the simultaneous inputdetection means detects that a motion of the first housing was detectedwithin such a time period, the game control means executes the firstgame processing.

When the simultaneous input detection means does not detect that amotion of the second housing was detected within the simultaneous inputacceptance time period after the motion of the first housing wasdetected by the first motion operation detection means, the game controlmeans may execute second game processing which is different from thefirst game processing (S216).

Owing to the above-described structure, the simultaneous motionoperations and also a motion operation of one operation unit may be usedfor the game input.

When the simultaneous input detection means does not detect that amotion of the first housing was detected within the simultaneous inputacceptance time period after the motion of the second housing wasdetected by the second motion operation detection means, the gamecontrol means may execute third game processing which is different fromthe first game processing or the second game processing.

The game control means may execute the first game processing when thesimultaneous input detection means detects that a motion of the secondhousing was detected within the simultaneous input acceptance timeperiod, and may execute the second game processing at a time point whenthe simultaneous input acceptance time period passes without thesimultaneous input detection means detecting that a motion of the secondhousing was detected within the simultaneous input acceptance timeperiod.

The first motion operation detection means may not newly detect a motionof the first housing until an acceptance prohibition time period passesafter a timing determined in relation with the detection of the motionof the first housing; and

the second motion operation detection means may not newly detect amotion input of the second housing until the acceptance prohibition timeperiod passes after the motion of the second housing was detected.

Owing to the above-described structure, the problem is avoided that oncea motion input operation is performed, inputs are continuously made fora while.

The acceptance prohibition time period is a predetermined time periodwhich is counted from a timing determined in relation with the detectionof the motion of the housing, and may be fixed or variable in accordancewith the state or level of the game.

Neither the first motion operation detection means nor the second motionoperation detection means may newly detect a motion of the first housingor the second housing until a post-simultaneous input acceptanceprohibition time period passes after a timing determined in relationwith the detection, by the simultaneous input detection means, ofsimultaneous inputs which means that within a predetermined time periodafter a motion of one of the first housing and the second housing wasdetected, a motion of the other was detected.

Owing to the above-described structure, when neither operation unit canmake an input, the timing for permitting the re-start of the input ismatched.

The post-simultaneous input acceptance prohibition time period is apredetermined time period which is counted from a timing determined inrelation with the detection of simultaneous inputs by the simultaneousinput detection means, and may be fixed or variable in accordance withthe state or level of the game. The post-simultaneous input acceptanceprohibition time period may be the same as, or longer than, theacceptance prohibition time period. The “timing determined in relationwith the detection of simultaneous inputs” is a predetermined timingduring simultaneous inputs as a target of detection; and is, forexample, a time point at which such simultaneous inputs were detected ora predetermined time point during such simultaneous inputs to bedetected (e.g., the start point or the end point of such simultaneousinputs or a predetermined intermediate point during such simultaneousinputs).

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game processing using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion and an output from a second sensor (761)provided in a second housing (77) separate from the first housing andcapable of detecting a motion. The game program causes a computer (30)of a game apparatus (3) to function as:

first motion detection means for detecting a motion and a strengththereof of the first housing based on an output from the first sensor(S236);

second motion detection means for detecting a motion and a strengththereof of the second housing based on an output from the second sensor(S250);

simultaneous input detection means for detecting, based on the detectionresults of the first motion detection means and the second motiondetection means, whether or not a motion of the second housing wasdetected within a simultaneous input acceptance time period which iscounted from a timing determined in relation with the detection of amotion of the first housing (S254); and

game control means for, when the simultaneous input detection meansdetects that a motion of the second housing was detected within thesimultaneous input acceptance time period which is counted from thetiming determined in relation with the detection of the motion of thefirst housing, executing first game processing using the strength of themotion of the first housing detected by the first motion detection meansand the strength of the motion of the second housing detected by thesecond motion detection means (S256).

Owing to the above-described structure, the simultaneous motionoperations and the magnitudes of the motions can be used for the gameinput (with a timing difference between the simultaneous motionoperations being tolerated).

The first game processing may be executed as follows. The simultaneousinput detection means detects, based on the detection results of thefirst motion detection means and the second motion detection means,whether or not a motion of the first housing was detected within asimultaneous input acceptance time period after a timing determined inrelation with the detection of the motion of the second housing. Whenthe simultaneous input detection means detects that a motion of thefirst housing was detected within such a simultaneous input acceptancetime period, the game control means executes the first game processingusing the strength of the motion of the first housing detected by thefirst motion detection means and the strength of the motion of thesecond housing detected by the second motion detection means.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game processing using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion and an output from a second sensor (761)provided in a second housing (77) separate from the first housing andcapable of detecting a motion. The game program causes a computer (30)of a game apparatus (3) to function as:

first motion operation detection means for detecting a motion of thefirst housing based on an output from the first sensor (S302);

second motion operation detection means for detecting a motion of thesecond housing based on an output from the second sensor (S318);

simultaneous input detection means for, when a motion operation on thefirst housing was performed, detecting whether or not a motion operationon the second housing was performed within a predetermined time periodbefore the motion operation on the first housing, based on the detectionresults of the first motion operation detection means and the secondmotion operation detection means (S312); and

game control means for, (a) when the simultaneous input detection meansdetects that a motion operation on the second housing was performedwithin the predetermined time period before the motion operation on thefirst housing, causing a game object to perform a first motion; and (b)when the simultaneous input detection means does not detect that amotion operation on the second housing is performed within thepredetermined time period before the motion operation on the firsthousing, causing a game object to perform a second motion which isdifferent from the first motion (S314, S316).

Owing to the above-described structure, the simultaneous motionoperations can be used for the game input (with a timing differencebetween the simultaneous motion operations being tolerated).

The first motion, the second motion or a third motion may be executed asfollows. When a motion operation on the second housing is performed, thesimultaneous input detection means detects whether or not a motionoperation on the first housing was performed within a predetermined timeperiod before the motion operation of the second housing, based on thedetection results of the first motion operation detection means and thesecond motion operation detection means. When the simultaneous inputdetection means detects that the motion operation on the first housingwas performed, the game control means causes the game object to performthe first motion. When the simultaneous input detection means does notdetect that the motion operation on the first housing was performed, thegame control means causes the game object to perform the third motion.Alternatively, each time the first motion operation detection means orthe second motion operation detection means detects a motion of thefirst housing or the second housing, the simultaneous input detectionmeans detects such a motion, so that the game control means causes thegame object to perform the first motion, the second motion or the thirdmotion.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting an inclination and an output from a second sensor(761) provided in a second housing (77) separate from the first housingand capable of detecting an inclination. The game program causes acomputer (30) of a game apparatus (3) to function as:

reference value setting instruction detection means for detecting areference value setting instruction from a player (S134);

reference value setting means for, when the reference value settinginstruction detection means detects a reference value settinginstruction, setting a first reference value and a second referencevalue based on an output value from the first sensor and/or an outputvalue from the second sensor (S146);

first posture detection means for detecting a posture of the firsthousing based on an output value from the first sensor and the firstreference value (S104, S112);

second posture detection means for detecting a posture of the secondhousing based on an output value from the second sensor and the secondreference value (S108, S114);

posture difference detection means for detecting a difference betweenthe posture of the first housing detected by the first posture detectionmeans and the posture of the second housing detected by the secondposture detection means (S116); and

game control means for executing game control using the differencedetected by the posture difference detection means (S118).

Owing to the above-described structure, the player can play the gamewhile being in any posture using two inclination sensors.

The reference setting means may set the output value itself from thesensor as the reference value, or may set a result obtained bycalculating an inclination value from the output value as the referencevalue. When the first reference value and the second reference value arethe same, only one data may be stored.

The reference value setting means may set the first reference value andthe second reference value at the same timing in accordance with thedetection of a single reference value setting instruction by thereference value setting instruction detection means.

Owing to the above-described structure, it can be prevented that thesame data is input as different data in error.

When the reference value setting instruction detection means detects thereference value setting instruction, the reference value setting meansmay set a value obtained by a predetermined calculation based on anoutput value from the first sensor and an output value from the secondsensor, commonly as the first reference value and the second referencevalue.

Owing to the above-described structure, it can be prevented that thesame data is input as different data in error.

The predetermined calculation is, for example, averaging. Weighting maybe performed in accordance with, for example, the size or the shape ofthe first housing and the second housing, whether there is an operationsection or not in each housing, or whether the respective housing is forthe right hand or the left hand.

When the reference value setting instruction detection means detects thereference value setting instruction, the reference value setting meansmay set a value based on either an output value from the first sensor oran output value from the second sensor, commonly as the first referencevalue and the second reference value.

Owing to the above-described structure, it can be prevented that thesame data is input as different data in error.

The first housing and/or the second housing includes a switch forallowing the player to input the reference value setting instruction;and

when the reference value setting instruction detection means detects thereference value setting instruction, the reference value setting meansmay commonly set the first reference value and the second referencevalue based on an output value from either the first sensor or thesecond sensor which does not include the switch used for inputting thereference value setting instruction.

Owing to the above-described structure, the influence of the vibrationof the housing which occurs when a button is pressed can be eliminated.

The reference value setting means may comprise reference value settingtime difference detection means for, when the reference value settinginstruction detection means detects the reference value settinginstruction, determining whether or not a difference between theinclination of the first housing and the inclination of the secondhousing is within a predetermined range, based on an output value fromthe first sensor and an output value from the second sensor (S148); and

the reference value setting means, (a) when the reference value settingtime difference detection means determines that the difference is withinthe predetermined range, may set the first reference value and thesecond reference value respectively based on the output value from thefirst sensor and the output value from the second sensor; and (b) whenthe reference value setting time difference detection means determinesthat the difference is not within the predetermined range, may executeerror processing.

Owing to the above-described structure, it can be prevented that thesame data is input as different data in error.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) which is an acceleration sensor or agyrosensor provided in a first housing (71) and an output from a secondsensor (761) which is an acceleration sensor or a gyrosensor provided ina second housing (77) separate from the first housing. The game programcauses a computer (30) of a game apparatus (3) to function as:

posture control means for controlling a posture of a game object basedon an output from the first sensor (S410); and

movement control means for controlling a movement of the game objectbased on an output from the second sensor (S416).

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion in at least two axial directions and anoutput from a second sensor (761) provided in a second housing (77)separate from the first housing and capable of detecting a motion in atleast two axial directions. The game program causes a computer (30) of agame apparatus (3) to function as:

first motion direction detection means for detecting a first motiondirection representing a direction in which the first housing was movedbased on an output from the first sensor (S542);

second motion direction detection means for detecting a second motiondirection representing a direction in which the second housing was movedbased on an output from the second sensor (S570);

synthesized direction determination means for determining a synthesizeddirection by synthesizing the first motion direction detected by thefirst motion direction detection means and the second motion directiondetected by the second motion direction detection means (S552); and

game control means for executing game control using the synthesizeddirection determined by the synthesized direction determination means(S554).

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game processing using anoutput from a first sensor (701) provided in a first housing (71) fordetecting a motion and an output from a second sensor (761) provided ina second housing (77) separate from the first housing for detecting amotion. The game program causes a computer (30) of a game apparatus (3)to function as:

first strength detection means for detecting a strength of a motion ofthe first housing based on an output from the first sensor (S542);

second strength detection means for detecting a strength of a motion ofthe second housing based on an output from the second sensor (S570);

synthesized strength determination means for determining a synthesizedstrength by synthesizing the strength of the motion of the first housingdetected by the first strength detection means and the strength of themotion of the second housing detected by the second strength detectionmeans (S552); and

game control means for executing game control using the synthesizedstrength determined by the synthesized strength determination means(S554).

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion in at least two axial directions and anoutput from a second sensor (761) provided in a second housing (77)separate from the first housing and capable of detecting a motion in atleast two axial directions. The game program causes a computer (30) of agame apparatus (3) to function as:

first motion direction detection means for detecting a first motiondirection representing a direction in which the first housing was movedbased on an output from the first sensor (S542);

second motion direction detection means for detecting a second motiondirection representing a direction in which the second housing was movedbased on an output from the second sensor (S570);

motion direction relationship determination means for determiningwhether or not the first motion direction detected by the first motiondirection detection means and the second motion direction detected bythe second motion direction detection means fulfill a predeterminedrelationship (S550); and

game control means for, when the motion direction relationshipdetermination means determines that the first motion direction and thesecond motion direction fulfill the predetermined relationship,executing game control based on the motion direction and/or a motionstrength of at least one of the first housing and the second housing(S552).

The motion direction relationship determination means may determinewhether or not the first motion direction and the second motiondirection substantially match each other, may determine whether or notthe first motion direction and the second motion direction aresubstantially opposite to each other, or may determine whether or notthe first motion direction and the second motion direction make apredetermined angle. The motion direction relationship determinationmeans may compare two-dimensional directions (components ofpredetermined two directions) or two-dimensional directions.

When the motion direction relationship determination means determinesthat the predetermined relationship is fulfilled, the game control meansmay execute the game control based on the motion direction of either thefirst housing or the second housing, or based on the motion directionsof both the first housing and the second housing (for example, byperforming a predetermined calculation such as addition, averaging orthe like). The game control means may execute the game control based onthe motion strength instead of the motion direction, or based both onthe motion direction and the motion strength.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion in at least two axial directions and anoutput from a second sensor (761) provided in a second housing (77)separate from the first housing and capable of detecting a motion in atleast two axial directions. The game program causes a computer (30) of agame apparatus (3) to function as:

first motion operation detection means for detecting a motion of thefirst housing based on an output from the first sensor (S542);

second motion operation detection means for detecting a motion of thesecond housing based on an output from the second sensor (S570);

motion timing relationship determination means for determining, based onthe detection results of the first motion operation detection means andthe second motion operation detection means, whether or not a timing atwhich the motion of the first housing is detected and a timing at whichthe motion of the second housing is detected fulfill a predeterminedrelationship (S548); and

game control means for, when the motion timing relationshipdetermination means determines that the timing at which the motion ofthe first housing is detected and the timing at which the motion of thesecond housing is detected fulfill the predetermined relationship,executing game control based on a motion direction and/or a motionstrength of at least one of the first housing and the second housing(S552).

The motion timing relationship determination means may determine, forexample, whether or not the timing at which the motion of the firsthousing is detected and the timing at which the motion of the secondhousing is detected substantially match each other, or may determinewhether or not these timings have a predetermined interval therebetween.When the motion timing relationship determination means determines thatthe predetermined relationship is fulfilled, the game control means mayexecute the game control based on the motion direction of either thefirst housing or the second housing, or based on the motion directionsof both the first housing and the second housing (for example, byperforming a predetermined calculation such as addition, averaging orthe like). The game control means may execute the game control based onthe motion strength instead of the motion direction, or based both onthe motion direction and the motion strength.

The game control means may execute the game control based on the motiondirection and/or the motion strength of both of the first housing andthe second housing.

The game control means may execute the game control based on the motiondirection and the motion strength of both of the first housing and thesecond housing.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion in at least two axial directions and anoutput from a second sensor (761) provided in a second housing (77)separate from the first housing and capable of detecting a motion in atleast two axial directions. The game program causes a computer (30) of agame apparatus (3) to function as:

first motion direction detection means for detecting a first motiondirection representing a direction in which the first housing was movedbased on an output from the first sensor (S542);

second motion direction detection means for detecting a second motiondirection representing a direction in which the second housing was movedbased on an output from the second sensor (S570);

motion direction relationship determination means for determiningwhether or not the first motion direction detected by the first motiondirection detection means and the second motion direction detected bythe second motion direction detection means fulfill a predeterminedrelationship (S550); and

game control means for, when the motion direction relationshipdetermination means determines that the first motion direction and thesecond motion fulfill the predetermined relationship, causing a gameobject to perform a specific motion (S554).

The motion direction relationship determination means may determinewhether or not the first motion direction and the second motiondirection substantially match each other, may determine whether or notthe first motion direction and the second motion direction aresubstantially opposite to each other, or may determine whether or notthe first motion direction and the second motion direction make apredetermined angle. The motion direction relationship determinationmeans may determine which one of a plurality of relationship candidatesis the relationship between the first motion direction and the secondmotion direction, and may determine one specific motion in accordancewith the determination result.

A computer-readable storage medium according to still another embodimentof the present invention has stored thereon a game program for executinggame control using an output from a first sensor (701) provided in afirst housing (71) for detecting a motion and an output from a secondsensor (761) provided in a second housing (77) separate from the firsthousing for detecting a motion. The game program causes a computer (30)of a game apparatus (3) to function as:

first motion operation detection means for detecting a motion and astrength thereof of the first housing based on an output from the firstsensor (S236);

second motion operation detection means for detecting a motion and astrength thereof of the second housing based on an output from thesecond sensor (S250);

motion timing relationship determination means for determining, based onthe detection results of the first motion operation detection means andthe second motion operation detection means, whether or not a timing atwhich the motion of the first housing is detected and a timing at whichthe motion of the second housing is detected fulfill a predeterminedrelationship (S240); and

game control means for, when the motion timing relationshipdetermination means determines that the timing at which the motion ofthe first housing is detected and the timing at which the motion of thesecond housing is detected fulfill the predetermined relationship,causing a game object to perform a specific motion (S242).

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion in at least two axial directions and anoutput from a second sensor (761) provided in a second housing (77)separate from the first housing and capable of detecting a motion in atleast two axial directions. The game program causes a computer (30) of agame apparatus (3) to function as:

first motion direction detection means for detecting a first motiondirection representing a direction in which the first housing was movedbased on an output from the first sensor (S748);

second motion direction detection means for detecting a second motiondirection representing a direction in which the second housing was movedbased on an output from the second sensor (S782); and

game control means for, when the first motion direction detected by thefirst motion direction detection means is in a first range and thesecond motion direction detected by the second motion directiondetection means is in a second range, executing game control based onthe first motion direction and the second motion direction (S752, S786,S758).

The first range and the second range may not overlap or partiallyoverlap, but do not completely overlap.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a first sensor (701) provided in a first housing (71) andcapable of detecting a motion or a posture and an output from a secondsensor (761) provided in a second housing (77) separate from the firsthousing and capable of detecting a motion or a posture. The game programcauses a computer (30) of a game apparatus (3) to function as:

first game control means for executing first game processing based on anoutput from the first sensor (S410);

second game control means for executing second game processing based onan output from the second sensor (S416); and

reference sensor exchange means for changing the sensor referred to bythe first game control means for executing the first game processingfrom the first sensor to the second sensor, and for changing the sensorreferred to by the second game control means for executing the secondgame processing from the second sensor to the first sensor, inaccordance with an instruction of a player (S404).

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a sensor (701) at least capable of detecting a motion in twoaxial directions of a first axis direction and a second axis direction.The game program causes a computer (30) of a game apparatus (3) tofunction as:

motion detection means for detecting a motion in the first axisdirection of the sensor (S742); and

game control means for, when the motion detection means detects a motionin the first axis direction, executing game processing based on anoutput from the sensor in the second axis direction at a time point orduring a time period which is determined in relation with the detectionof the motion (S718).

The “time point or time period which is determined in relation with thedetection of the motion” may be (1) or (2) below. In order to keep thecontinuity between the motion input in the first axis direction and themotion input in the second axis direction, it is preferable that such atime point or time period is within a predetermined time period from apredetermined time point during the motion input in the first axisdirection.

(1) A time point or time period which is determined based on apredetermined time point during the motion input in the first axisdirection as a target of detection (the “predetermined time point duringthe motion input in the first axis direction as a target of detection”is a time point when the motion input in the first axis direction wasdetected, the start point or the end point of the motion input, apredetermined intermediate time point during the motion input, etc.).

(2) A predetermined time point or a predetermined time period during amotion in the second axis direction when the motion in the second axisdirection is detected during the time period determined based on thepredetermine time point during the motion input in the first axisdirection as the target of detection.

The time point or time period in (1) above may be the following.

(a) A time point which is the same as a predetermined time point duringthe motion input in the first axis direction (hereinafter, such apredetermined time point will be referred to as “first time point”);

(b) A time point before the first time point by a predetermined timeperiod;

(c) A time point after the first time point by a predetermined timeperiod;

(d) A time period of: the time point before the first time point by apredetermine time period—the first time period;

(e) A time period of: the first time point—the time point after thefirst time point by a predetermine time period;

(f) A time period of: the time point before the first time point by afirst time period—the time point before the first time point by a secondtime period (first time period>second time period);

(g) A time period of: the time point after the first time point by afirst time period—the time point after the first time point by a secondtime period (first time period<second time period); and

(h) A time period of: the time point before the first time point by afirst time period—the time point after the first time point by a secondtime period.

The time point or time period in (2) may be determined as follows. Whendetecting a “swing motion”, the motion detection means detects whetheror not a swing in the second axis direction is detected at the timepoint or during a time period represented by (a) through (h). When sucha swing is detected, the “time point or time period in (2) may be:

a time period of the swing in the second axis direction, i.e., from theswing start until the swing end [accelerationrise→maximum→0→acceleration detection in the opposite direction→maximumin the opposite direction→0]; or

a part thereof [e.g., a time period of: acceleration rise→maximum→0; ora time period of: acceleration detection in the oppositedirection→maximum in the opposite direction→0].

In the case where the “time point or time period which is determined inrelation with the detection of the motion” is a time point or timeperiod before the first time point, the input is to be made as follows:after an input in the second axis direction is made, an input in thefirst axis direction is made, to validate the input in the second axisdirection (even when an input in the second axis direction is made, suchan input is not validated unless an input in the first axis direction ismade thereafter). In the case where the “time point or time period whichis determined in relation with the detection of the motion” is a timepoint or time period after the first time point, the input is to be madeas follows: after an input in the first axis direction is made, an inputin the second axis direction is accepted (even when an input in thesecond axis direction is made, such an input is not validated unless aninput in the first axis direction is made beforehand). In the case wherethe “time point or time period which is determined in relation with thedetection of the motion” is a time period crossing the first time point,the input is to be made as follows: an input in the second axisdirection is made while making an input in the first axis direction toindicate that the input in the second axis direction is valid (unless aninput in the second axis direction is made while making an input in thefirst axis direction, the input in the second axis direction is notvalidated).

The expression “executing game processing based on an output from thesensor in the second axis direction” may mean the following. In the casewhere the game processing is executed based on an output from the sensorin the second axis direction during a time period which is determined inrelation with the detection of the motion, a sum/average (including aweighted average)/maximum value/integral of the outputs in the secondaxis direction during that time period are used, or a difference betweenthe continuous outputs during that time period is used.

A computer-readable storage medium according to still another embodimenthas stored thereon a game program for executing game control using anoutput from a sensor (701) capable of detecting a motion in three axialdirections of a first axis direction, a second axis direction and athird axis direction. The game program causes a computer (30) of a gameapparatus (3) to function as:

motion detection means for detecting a motion in the first axisdirection of the sensor (S742); and

game control means for, when the motion detection means detects a motionin the first axis direction, executing game control using a directionrepresented by an output from the sensor in the second axis directionand an output from the sensor in the third axis direction at a timepoint or during a time period which is determined based on the timepoint when the motion was detected (S718).

When the motion detection means detects a motion in the first axisdirection, the game control means may execute game control using anoutput from the sensor in the second axis direction at a time point orduring a time period which is determined based on the time point whenthe motion was detected, and also using a magnitude of an output fromthe sensor in the first axis direction regarding the motion in the firstaxis direction.

When the motion detection means detects a motion in the first axisdirection, the game control means may detect whether or not there is amotion in the second axis direction at a time point or during a timeperiod which is determined based on the time point when the motion inthe first axis direction was detected (S750); and when the motion in thesecond axis direction is detected, may execute game control using anoutput in the second axis direction.

The “sensor capable of detecting a posture” may be an accelerationsensor, a gyrosensor or the like. More specifically, the “sensor capableof detecting a posture” is a sensor capable of detecting a posture ofitself (a posture of a housing including the sensor itself). The“posture” is typically an inclination (inclination with respect to thedirection of gravity; i.e., an angle of rotation around the horizontalaxis), but may be an angle of rotation around an axis other than thehorizontal axis, for example.

The “sensor capable of detecting an inclination” may be an accelerationsensor, a gyrosensor or the like. More specifically, the “sensor capableof detecting an inclination” is a sensor capable of detecting aninclination of itself (an inclination of a housing including the sensoritself).

The “sensor capable of detecting a motion” may be an accelerationsensor, a gyrosensor or the like. More specifically, the “sensor capableof detecting a motion” is a sensor capable of detecting a motion ofitself (a motion of a housing including the sensor itself).

The “motion operation detection means” may detect that the housing wassimply moved, or may detect that the housing made a predetermined motion(e.g., a swing).

Now, an acceleration sensor is influenced by an acceleration motion or agravitational acceleration and detects an acceleration of a linearcomponent in each of the sensing axis directions. By contrast, agyroscope or a gyrosensor detects an angular velocity accompanying arotation. The acceleration sensor, even when being rotated around theaxis thereof, cannot detect an acceleration in each axis other than thegravitational acceleration. By contrast, the gyroscope cannot detect alinear acceleration which does not accompany a rotation. Therefore, whenthe acceleration sensor is merely replaced with a gyroscope, or when thegyroscope is merely replaced with an acceleration sensor, the samefunctions as those before the replacement are not provided. Byperforming additional complicated processing for absorbing thedifference between the acceleration sensor and the gyroscope, theacceleration sensor may be replaced with a gyroscope or the gyroscopemay be replaced with an acceleration sensor.

The acceleration sensor detects an acceleration of a linear componentalong each axis, and cannot directly detect a rotation or aninclination. Therefore, a rotation or an inclination of the posture of adevice including an acceleration sensor is obtained by performing apredetermined calculation on the acceleration detected for each axis.For example, when the acceleration sensor is in a still state, agravitational acceleration is always applied. Thus, an acceleration inaccordance with the inclination of each axis with respect to thegravitational acceleration is detected. Specifically, when theacceleration sensor is in a horizontal still state, a gravitationalacceleration of 1 G is applied to the Y axis of the acceleration sensor,and the gravitational acceleration in other axes is almost zero. Whenthe acceleration sensor is inclined from the horizontal state, thegravitational acceleration is divided into the axes in accordance withthe directions of the axes of the acceleration sensor and the angles ofthe axes with respect to the direction of gravity. At this point, anacceleration value of each axis of the acceleration sensor is detected.By performing a calculation on such an acceleration value of each axis,the posture of the acceleration sensor with respect to the direction ofgravity can be calculated. A rotation is considered as a continuouschange of the posture. Thus, a rotation angle can be calculated throughsoftware by calculating a change from an inclination of the posture atone point to an inclination of the posture at another point.

Using a gyroscope, a change from an inclination of the posture in onestate until an inclination of the posture in another state can becalculated as follows, for example. At the start of the detection by thegyroscope, an inclination value is initialized. Angular velocity datawhich is output from the gyroscope from this time point is integrated.Then, a change amount in the inclination from the initialized value iscalculated. Thus, an angle with respect to the posture at theinitialization point can be obtained. Namely, a relative angle withrespect to a certain point can be obtained. When a posture of a deviceincluding a gyroscope with respect to the direction of gravity needs tobe found, the initialization needs to be conducted where the device isin a state based on the direction of gravity (e.g., in a horizontalstate). By contrast, a device including an acceleration sensor has anadvantage that initialization is not necessary because the accelerationsensor uses the direction of gravity as the reference direction.

According to the present technology, the player can freely move both ofhis/her hands during the play. Therefore, a dynamic play is madepossible with a high degree of freedom of motion. Since the control isexecuted by a posture difference, an intuitive motion input is realized.

These and other features, aspects and advantages of the presenttechnology will become more apparent from the following detaileddescription of the present technology when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an external view of a game system 1 according to anembodiment;

FIG. 2 is a block diagram of a game apparatus 3;

FIG. 3 is an isometric view of a controller 7 showing an externalappearance thereof;

FIG. 4 is an isometric view of a core unit 70 in a state where an upperhousing thereof is removed;

FIG. 5 is an isometric view of a sub unit 76 in a state where an upperhousing thereof is removed;

FIG. 6 is a block diagram illustrating a structure of the controller 7;

FIG. 7 generally shows how to perform a game operation using thecontroller 7;

FIG. 8 shows an exemplary game image in a first embodiment;

FIG. 9 shows an exemplary correspondence between the operation performedby the player and the motion of the character in the first embodiment;

FIG. 10 is a memory map of a main memory in the first embodiment;

FIG. 11 is a part of a flowchart illustrating a flow of processingexecuted by a CPU in the first embodiment;

FIG. 12 is a flowchart illustrating neutral position setting processingin the first embodiment in detail;

FIG. 13 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the first embodiment;

FIG. 14 is a flowchart illustrating the detection of inclination in thefirst embodiment in detail;

FIG. 15 shows an exemplary method for changing a directional vector inthe first embodiment;

FIG. 16 shows an exemplary correspondence between the inclination of theoperation unit and the detection result of the inclination in the firstembodiment;

FIG. 17 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in amodification to the first embodiment;

FIG. 18 is a flowchart illustrating a flow of processing executed by theCPU in the modification to the first embodiment;

FIG. 19 shows an exemplary game image in a second embodiment;

FIG. 20 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in the secondembodiment;

FIG. 21 is a memory map of the main memory in the second embodiment;

FIG. 22 is a part of a flowchart illustrating a flow of processingexecuted by the CPU in the second embodiment;

FIG. 23 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the second embodiment;

FIG. 24 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the second embodiment;

FIG. 25 is a flowchart illustrating the detection of swinging strengthin the second embodiment in detail;

FIG. 26 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in a thirdsecond embodiment;

FIG. 27 is a memory map of the main memory in the third embodiment;

FIG. 28 is a part of a flowchart illustrating a flow of processingexecuted by the CPU in the third embodiment;

FIG. 29 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the third embodiment;

FIG. 30 is a flowchart illustrating the detection of swing operation inthe third embodiment in detail;

FIG. 31 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in a fourthembodiment;

FIG. 32 is a memory map of the main memory in the fourth embodiment;

FIG. 33 is a part of a flowchart illustrating a flow of processingexecuted by the CPU in the fourth embodiment;

FIG. 34 is a flowchart illustrating the detection of inclination in thefourth embodiment in detail;

FIG. 35 is a flowchart illustrating the detection of swing operation inthe fourth embodiment in detail;

FIG. 36 shows an exemplary correspondence between the inclination of theoperation unit and the detection result of the inclination in the fourthembodiment;

FIG. 37 shows an exemplary method for changing a directional vector inthe fourth embodiment;

FIG. 38 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in a fifthembodiment;

FIG. 39 is a memory map of the main memory in the fifth embodiment;

FIG. 40 is a part of a flowchart illustrating a flow of processingexecuted by the CPU in the fifth embodiment;

FIG. 41 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the fifth embodiment;

FIG. 42 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the fifth embodiment;

FIG. 43 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the fifth embodiment;

FIG. 44 is a flowchart illustrating the detection of swinging directionin the fifth embodiment in detail;

FIG. 45 shows an exemplary method for changing a velocity vector in thefifth embodiment;

FIG. 46 shows another exemplary method for changing a velocity vector inthe fifth embodiment;

FIG. 47 shows an exemplary operation performed by the player in a sixthembodiment;

FIG. 48 a memory map of the main memory in the sixth embodiment;

FIG. 49 is a part of a flowchart illustrating a flow of processingexecuted by the CPU in the sixth embodiment;

FIG. 50 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the sixth embodiment;

FIG. 51 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the sixth embodiment;

FIG. 52 is a part of the flowchart illustrating the flow of processingexecuted by the CPU in the sixth embodiment;

FIG. 53 is a flowchart illustrating trigger operation strength detectionin the sixth embodiment in detail;

FIG. 54 shows an exemplary method for changing a velocity vector in thesixth embodiment;

FIG. 55 shows another exemplary method for changing a velocity vector inthe sixth embodiment;

FIG. 56 shows a correspondence between the operation performed by theplayer and the output from the acceleration sensor in the sixthembodiment; and

FIG. 57 shows another exemplary method for changing a velocity vector inthe sixth embodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

With reference to FIG. 1, a game system 1 according to one embodimentwill be described. FIG. 1 is an external view illustrating the gamesystem 1. In the following example, the game system 1 includes aninstallation type game apparatus 3.

As shown in FIG. 1, the game system 1 includes a display (hereinafter,referred to as a “monitor”) 2 such as a home-use TV receiver or thelike, which includes speakers 2 a, the installation type game apparatus(hereinafter, referred to simply as a “game apparatus”) 3 connected tothe monitor 2 via a connection cord, and a controller 7 for providingthe game apparatus 3 with operation information. The game apparatus 3 isconnected to a receiving unit 6 via a connection terminal. The receivingunit 6 receives transmission data which is wirelessly transmitted fromthe controller 7. The controller 7 and the game apparatus 3 areconnected to each other via wireless communication. On the gameapparatus 3, an optical disc 4 as an exemplary exchangeable informationstorage medium is detachably mounted. On a main top surface of the gameapparatus 3, a power ON/OFF switch for the game apparatus 3, a resetswitch for game processing, and an OPEN switch for opening a top lid ofthe game apparatus 3 are provided. When the player presses the OPENswitch, the lid is opened to allow the optical disc 4 to be mounted ordismounted.

Also on the game apparatus 3, an external memory card 5 is detachablymounted when necessary. The external memory card 5 includes a backupmemory or the like for fixedly storing saved data or the like. The gameapparatus 3 executes a game program or the like stored on the opticaldisc 4 and displays the result on the monitor 2 as a game image. Thegame apparatus 3 can also reproduce a state of a game played in the pastusing saved data stored on the external memory card 5 and display a gameimage on the monitor 2. The player using the game apparatus 3 can enjoythe game by operating the controller 7 while watching the game imagedisplayed on the monitor 2.

The controller 7 wirelessly transmits transmission data to the gameapparatus 3 connected to the receiving unit 6 from a communicationsection 75 (see FIG. 6) included in the controller 7 using, for example,the Bluetooth (registered trademark) technology. The controller 7includes two control units (a core unit 70 and a sub unit 76) connectedto each other via a bendable connection cable 79. The controller 7 iscontrol means mainly for operating a player object appearing in a gamespace displayed on the monitor 2. The core unit 70 and the sub unit 76each have operation sections such as a plurality of operation buttons,keys, a stick and the like. As described later, the core unit 70includes an imaging information calculation section 74 (see FIG. 6) fortaking an image seen from the core unit 70. As an example of imagingtarget of the imaging information calculation section 74, two LEDmodules 8L and 8R are provided in the vicinity of the display screen ofthe monitor 2. The LED modules 8L and 8R output infrared light forwardfrom the side of the monitor 2. In this example, the core unit 70 andthe sub unit 76 are connected to each other via the bendable connectioncable 79, but the sub unit 76 may include a wireless unit. In this case,the connection cable 79 is not necessary. When, for example, a Bluetooth(registered trademark) unit is mounted on the sub unit 76 as a wirelessunit, operation data can be transmitted from the sub unit 76 to the coreunit 70.

Next, with reference to FIG. 2, a structure of the game apparatus 3 willbe described. FIG. 2 is a functional block diagram of the game apparatus3.

As shown in FIG. 2, the game apparatus 3 includes a CPU (centralprocessing unit) 30 (for example, a RISC CPU) for executing variousprograms. The CPU 30 executes a start program stored on a boot ROM (notshown) to initialize memories including a main memory 33, and thenexecutes a game program stored on the optical disc 4 to perform gameprocessing or the like in accordance with the game program. The CPU 30is connected to a GPU (Graphics Processing Unit) 32, the main memory 33,a DSP (Digital Signal Processor) 34, and an ARAM (Audio RAM) 35 via amemory controller 31. The memory controller 31 is connected to acontroller I/F (interface) 36, a video I/F 37, an external memory I/F38, an audio I/F 39, and a disc I/F 41 via a predetermined bus. Thecontroller I/F (interface) 36, the video I/F 37, the external memory I/F38, the audio I/F 39 and the disc I/F 41 are respectively connected tothe receiving unit 6, the monitor 2, the external memory card 5, thespeaker 2 a and a disc drive 40.

The GPU 32 performs image processing based on an instruction from theCPU 30. The GPU 32 includes, for example, a semiconductor chip forperforming calculation processing necessary for displaying 3D graphics.The GPU 32 performs the image processing using a memory dedicated forimage processing (not shown) or a part of the storage area of the mainmemory 33. The GPU 32 generates game image data or a movie to bedisplayed on the monitor 2 using such memories, and outputs thegenerated data or movie to the monitor 2 via the memory controller 31and the video I/F 37 as necessary.

The main memory 33 is a storage area used by the CPU 30, and stores agame program or the like necessary for processing performed by the CPU30 as necessary. For example, the main memory 33 stores a game program,various types of data or the like read from the optical disc 4 by theCPU 30. The game program, the various types of data or the like storedon the main memory 33 are executed by the CPU 30.

The DSP 34 processes sound data or the like generated by the CPU 30during the execution of the game program. The DSP 34 is connected to theARAM 35 for storing the sound data or the like. The ARAM 35 is used whenthe DSP 34 performs predetermined processing (e.g., storage of the gameprogram or sound data already read). The DSP 34 reads the sound datastored on the ARAM 35 and outputs the sound data to the speaker 2 aincluded in the monitor 2 via the memory controller 31 and the audio I/F39.

The memory controller 31 comprehensively controls data transfer, and isconnected to the various I/Fs described above. The controller I/F 36includes, for example, four controller I/Fs, each of which communicablyconnects an external device engageable with a connector thereof and thegame apparatus 3 to each other. For example, the receiving unit 6 isengaged with such a connector and is connected to the game apparatus 3via the controller I/F 36. The receiving unit 6 receives thetransmission data from the controller 7 as described above, and outputsthe transmission data to the CPU 30 via the controller I/F 36. The videoI/F 37 is connected to the monitor 2. The external memory I/F 38 isconnected to the external memory card 5, and is accessible to the backupmemory or the like included in the external memory card 5. The audio I/F39 is connected to the speaker 2 a built in the monitor 2, such that thesound data read by the DSP 34 from the ARAM 35 or sound data directlyoutput from the disc drive 40 is output through the speaker 2 a. Thedisc I/F 41 is connected to the disc drive 40. The disc drive 40 readsdata stored at a predetermined reading position of the optical disc 4and outputs the data to a bus of the game apparatus 3 or the audio I/F39.

With reference to FIG. 3, the controller 7 will be described. FIG. 3 isan isometric view showing an external appearance of the controller 7.

As shown in FIG. 3, the controller 7 includes the core unit 70 and thesub unit 76 which are connected to each other via the connection cable79. The core unit 70 has a housing 71, which includes a plurality ofoperation sections 72. The sub unit 76 has a housing 77, which includesa plurality of operation sections 78. The core unit 70 and the sub unit76 are connected to each other via the connection cable 79.

One of two ends of the connection cable 79 is provided with a connector791 which is detachable with a connector 73 (see FIG. 4) of the coreunit 70. The other end of the connection cable 79 is fixedly connectedwith the sub unit 76. The connector 791 of the connection cable 79 isengaged with the connector 73 provided on a bottom surface of the coreunit 70, and thus the core unit 70 and the sub unit 76 are connected toeach other via the connection cable 79.

The housing 71 of the core unit 70 is formed by plastic molding or thelike. The housing 71 has a generally parallelepiped shape, and theoverall size of the housing 71 is small enough to be held by one hand ofan adult or even a child.

At a center of a front surface of the housing 71, a cross key 72 a isprovided as direction instruction means. The cross key 72 a is across-shaped four-direction push switch. The cross key 72 a includesprojecting operation portions corresponding to the four directions (top,bottom, right and left) and arranged at an interval of 90 degrees. Theplayer selects one of the top, bottom, right and left directions bypressing one of the operation portions of the cross key 72 a. Through anoperation on the cross key 72 a, the player can, for example, instruct adirection in which a player character or the like appearing in a virtualgame world, or a cursor, is to move. Instead of the cross key 72 a, ajoystick capable of instructing any direction in 360 degrees may beprovided.

Downward with respect to the cross key 72 a on the front surface of thehousing 71, a plurality of operation buttons 72 b through 72 g areprovided. The operation buttons 72 b through 72 g are each an operationsection for outputting a respective operation signal when the playerpresses a head thereof. For example, the operation buttons 72 b through72 d are assigned functions of a first button, a second button, and an Abutton. The operation buttons 72 e through 72 g are assigned functionsof a minus button, a home button and a plus button, for example. Theoperation buttons 72 b through 72 g are assigned various functions inaccordance with the game program executed by the game apparatus 3.

Upward with respect to the cross key 72 a on the front surface of thehousing 71, an operation button 72 h is provided. The operation button72 h is a power switch for remote-controlling the power of the gameapparatus 3 to be on or off.

Downward with respect to the operation button 72 c on the front surfaceof the housing 71, a plurality of LEDs 702 are provided. The controller7 is assigned a controller type (number) so as to be distinguishablefrom the other controllers 7. For example, the LEDs 702 are used forinforming the player of the controller type which is currently set tothe controller 7 that he/she is using. Specifically, when the core unit70 transmits transmission data to the receiving unit 6, one of theplurality of LEDs corresponding to the controller type is lit up.

On the front surface of the housing 71, sound holes for outputting asound from a speaker 706 (see FIG. 4) described later are providedbetween the operation button 72 b and the operation buttons 72 e through72 g.

On a rear surface of the housing 71, an operation button (not shown) isprovided at a position at which an index finger or middle finger of theplayer is located when the player holds the core unit 70. The operationbutton acts as, for example, a B button, and is used as, for example, atrigger switch in a shooting game.

On a top surface of the housing 71, an imaging element 743 (see FIG. 6)included in the imaging information calculation section 74 (see FIG. 6)is provided. The imaging information calculation section 74 is a systemfor analyzing image data which is taken by the core unit 70, anddetecting the position of the center of gravity, the size and the likeof an area having a high brightness in the image data. The imaginginformation calculation section 74 has, for example, a maximum samplingperiod of about 200 frames/sec., and therefore can trace and analyzeeven a relatively fast motion of the core unit 70. The structure of theimaging information calculation section 74 will be described later indetail. On a bottom surface of the housing 71, the connector 73 (FIG. 4)is provided. The connector 73 is, for example, a 32-pin edge connector,and is used for engaging and connecting the connector 791 of theconnection cable 79.

Now, with reference to FIG. 4, an internal structure of the core unit 70will be described. FIG. 4 is an isometric view of the core unit 70,illustrating a state where an upper housing (a part of the housing 71)of the core unit 70 is removed.

As shown in FIG. 4, a substrate 700 is fixed inside the housing 71. On afront main surface of the substrate 700, the operation buttons 72 athrough 72 h, an acceleration sensor 701, the LEDs 702, the speaker 706,an antenna 754 and the like are provided. These elements are connectedto a microcomputer 751 (see FIG. 6) or the like via lines (not shown)formed on the substrate 700 or the like. The acceleration sensor 701 isprovided in a peripheral area of the substrate 700, not in a centralarea. Owing to such an arrangement, as the core unit 70 rotates around alongitudinal direction thereof as an axis, the acceleration sensor 701detects an acceleration including a centrifugal force component inaddition to a component of direction change of gravitationalacceleration. As a result, the rotation of the core unit 70 can bedetermined at a high sensitivity based on the detected acceleration datathrough a predetermined calculation.

On a rear main surface of the substrate 700, the image informationcalculation section 74 and the connector 73 are provided.

With reference to FIG. 3 and FIG. 5, the sub unit 76 will be described.FIG. 5 is an isometric view of the sub unit 76, illustrating a statewhere an upper housing (a part of the housing 77) of the sub unit 76 isremoved.

As shown in FIG. 3, the housing 77 of the sub unit 76 is formed byplastic molding or the like. The overall size of the housing 77 is smallenough to be held by one hand of an adult or even a child.

On a front surface of the housing 77, a stick 78 a is provided asdirection instruction means. The stick 78 a is an inclinable operationsection protruding from the front surface of the housing 77. When beinginclined, the stick 78 a outputs an signal in accordance with theinclination direction. The player can instruct, for example, anydirection or position by directing the tip of the stick 78 a in anydirection in 360 degrees. Thus, the player can instruct a direction inwhich a player character or the like appearing in the virtual gameworld, or a cursor, is to move. Instead of the stick 78 a, a cross keymay be provided.

On a top surface of the sub unit 76, a plurality of operation buttons 78d and 78 e (see FIG. 5) are provided. The operation buttons 78 d and 78e are each an operation section for outputting a respective operationsignal when the player presses a head thereof. For example, theoperation buttons 78 d and 78 e are assigned functions of an X buttonand a Y button. The operation buttons 78 d and 78 e are assigned variousfunctions in accordance with the game program executed by the gameapparatus 3.

As shown in FIG. 5, a substrate is fixed inside the housing 77. On thefront main surface of the substrate, the stick 78 a, an accelerationsensor 761 and the like are provided. These elements are connected tothe connection cable 79 via lines (not shown) formed on the substrate orthe like.

With reference to FIG. 6, an internal structure of the controller 7 willbe described. FIG. 6 is a block diagram showing a structure of thecontroller 7.

As shown in FIG. 6, the core unit 70 includes the communication section75 therein in addition to the operation sections 72, the imaginginformation calculation section 74, the acceleration sensor 701, thespeaker 706, the sound IC 707 and the amplifier 708 described above. Thesub unit 76 includes the operation sections 78 and the accelerationsensor 761 described above, and is connected to the microcomputer 751via the connection cable 79, the connector 791 and the connector 73.

The imaging information calculation section 74 includes an infraredfilter 741, a lens 742, the imaging element 743 and an image processingcircuit 744. The infrared filter 741 allows only infrared light to passtherethrough, among light incident on the top surface of the core unit70. The lens 742 collects the infrared light which has passed throughthe infrared filter 741 and outputs the infrared light to the imagingelement 743. The imaging element 743 is a solid-state imaging devicesuch as, for example, a CMOS sensor or a CCD, and takes an image of theinfrared light collected by the lens 742. Accordingly, the imagingelement 743 takes an image of only the infrared light which has passedthrough the infrared filter 741 for generating image data. The imagedata generated by the imaging element 743 is processed by the imageprocessing circuit 744. Specifically, the image processing circuit 744processes the image data obtained from the imaging element 743, sensesan area thereof having a high brightness, and outputs the processingresult data representing the detected position coordinate and size ofthe area to the communication section 75. The imaging informationcalculation section 74 is fixed to the housing 71 of the core unit 70.The imaging direction of the imaging information calculation section 74can be changed by changing the direction of the housing 71. Theconnection cable 79 which connects the housing 71 and the sub unit 76 isbendable. Therefore, even when the direction or position of the sub unit76 is changed, the imaging direction of the imaging informationcalculation section 74 is not changed. Based on the processing resultdata which is output from the imaging information calculation section74, a signal in accordance with the position or motion of the core unit70 can be obtained.

In this example, the core unit 70 includes the acceleration sensor 701.The acceleration sensor 701 included in the core unit 70 is preferably athree-axial (X, Y and Z axes in FIG. 4) acceleration sensor. Theacceleration sensor 761 included in the sub unit 76 is preferably athree-axial (X, Y and Z axes in FIG. 5) acceleration sensor. Thethree-axial acceleration sensors 701 and 761 each detect a linearacceleration in each of three directions, i.e., an X direction (leftside surface toward right side surface), a Y direction (top surfacetoward bottom surface), and a Z direction (front surface toward rearsurface). In other embodiments, two-axial acceleration detection meansfor detecting a linear acceleration in each of only the X direction andthe Y direction (or directions along another pair of axes) may be useddepending on the type of control signals used for game processing.Alternatively, one-axial acceleration detection means for detecting alinear acceleration in only the X direction (or other directions) may beused. For example, such three-axial, two-axial or one-axial accelerationsensors 701 and 761 may be available from Analog Devices, Inc. orSTMicroelectronics N.V. The acceleration sensors 701 and 761 may be of astatic capacitance coupling system based on the technology of MEMS(Micro Electro Mechanical Systems) provided by silicon precisionprocessing. Alternatively, the three-axial, two-axial or one-axialacceleration sensors 701 and 761 may be based on an existingacceleration detection technology (e.g., piezoelectric system orpiezoelectric resistance system) or any other appropriate technologydeveloped in the future.

As apparent to those skilled in the art, the acceleration detectionmeans used for the acceleration sensors 701 and 761 can detect only anacceleration along a straight line corresponding to each of the axes ofthe acceleration sensors 701 and 761 (linear acceleration sensors).Namely, a direct output from each of the acceleration sensors 701 and761 is a signal indicating the linear acceleration (static or dynamic)along each of the axes thereof. Hence, the acceleration sensors 701 and761 cannot directly detect a physical property such as, for example, amotion along a nonlinear path (e.g., an arc path), rotation, revolution,angular displacement, inclination, position or posture.

Nonetheless, those skilled in the art would easily understand from thedescription of this specification that further information on the coreunit 70 or the sub unit 76 can be estimated or calculated by executingadditional processing on an acceleration signal which is output from theacceleration sensor 701 or 761. For example, when a static acceleration(gravitational acceleration) is detected, an inclination of the object(core unit 70 or the sub unit 76) with respect to the gravitationalvector can be estimated by performing calculations based on theinclination angle and the detected acceleration, using the output fromthe acceleration sensor 701 or 761. By combining the acceleration sensor701 or 761 with the microcomputer 751 (or another processor) in thismanner, the inclination, posture or position of the core unit 70 or thesub unit 76 can be determined. Similarly, when the core unit 70including the acceleration sensor 701 or the sub unit 76 including theacceleration sensor 761 is dynamically accelerated by a hand of theplayer or the like as described herein, various motions and/or positionsof the core unit 70 or the sub unit 76 can be calculated or estimated byprocessing an acceleration signal generated by the acceleration sensor701 or 761. In other embodiments, the acceleration sensor 701 or 761 mayinclude a built-in signal processing device, or another type ofdedicated processing device, for executing desired processing on anacceleration signal which is output from the built-in accelerationdetection means, before the signal is output to the microcomputer 751.For example, when the acceleration sensor 701 or 761 is for detecting astatic acceleration (e.g., a gravitational acceleration), the built-inor dedicated processing device may convert the detected accelerationsignal to a corresponding inclination angle. The data indicating theacceleration detected by the acceleration sensor 701 or 761 is output tothe communication section 75.

The communication section 75 includes the microcomputer 751, a memory752, a wireless module 753, and the antenna 754. The microcomputer 751controls the wireless module 753 for wirelessly transmitting thetransmission data, while using the memory 752 as a storage area duringprocessing. The microcomputer 751 also controls the operation of thesound IC 707 in accordance with the data transmitted from the gameapparatus 3 to the wireless module 753 via the antenna 754. The sound IC707 processes sound data or the like transmitted from the game apparatus3 via the communication section 75.

Data from the core unit 70 including an operation signal from theoperation section 72 (core key data), acceleration signals from theacceleration sensor 701 (core acceleration data), and the processingresult data from the imaging information calculation section 74 areoutput to the microcomputer 751. Data transmitted from the sub unit 76via the connection cable 79, including an operation signal from theoperation section 78 (sub key data) and acceleration signals from theacceleration sensor 761 (sub acceleration data) are output to themicrocomputer 751. The microcomputer 751 temporarily stores the inputdata (core key data, sub key data, core acceleration data, subacceleration data, and the processing result data) in the memory 752 astransmission data which is to be transmitted to the receiving unit 6.The wireless transmission from the communication section 75 to thereceiving unit 6 is performed at a predetermined time interval. Sincegame processing is generally performed at a cycle of 1/60 sec., the datacollection and the wireless transmission need to be performed at a cycleof a shorter time period. Specifically, the game processing unit is 16.7ms ( 1/60 sec.), and the transmission interval of the communicationsection 75 structured using the Bluetooth (registered trademark)technology is, for example, 5 ms. At the transmission timing to thereceiving unit 6, the microcomputer 751 outputs the transmission datastored on the memory 752 as a series of operation information to thewireless module 753. Based on the Bluetooth (registered trademark)technology or the like, the wireless module 753 converts a carrier waveof a predetermined frequency with the operation information and radiatesthe resultant very weak radio signal from the antenna 754. Namely, thecore key data from the operation sections 72 in the core unit 70, thesub key data from the operation sections 78 in the sub unit 76, the coreacceleration data from the acceleration sensor 701 in the core unit 70,the sub acceleration data from the acceleration sensor 761 in the subunit 76, and the processing result data from the imaging informationcalculation section 74 are converted into a very weak radio signal bythe wireless module 743 and radiated from the core unit 70. Thereceiving unit 6 of the game apparatus 3 receives the very weak radiosignal, and the game apparatus 3 demodulates or decodes the very weakradio signal to obtain the series of operation information (the core keydata, the sub key data, the core acceleration data, the sub accelerationdata, and the processing result data). Based on the obtained operationinformation and the game program, the CPU 30 of the game apparatus 3performs the game processing. In the case where the communicationsection 75 is structured using the Bluetooth (registered trademark)technology or the like, the communication section 75 can have a functionof receiving transmission data which is wirelessly transmitted fromother devices.

As shown in FIG. 7, in order to play the game using the controller 7 ofthe game system 1, the player holds the core unit 70 with one hand (forexample, right hand) and holds the sub unit 76 with the other hand (forexample, left hand).

As described above, the inclination, posture, position or motion(movement or swing) of the core unit 70 can be determined using theoutput from the acceleration sensor 701 of the core unit 70 (coreacceleration data). More specifically, when the player moves his/herhand holding the core unit 70, for example, up, down, right or left, thecore unit 70 acts as operation input means for making an input inaccordance with the motion or direction of the player's hand. Also asdescribed above, the inclination, posture, position or motion (movementor swing) of the sub unit 76 can be determined using the output from theacceleration sensor 761 of the sub unit 76 (sub acceleration data). Morespecifically, when the player moves his/her hand holding the sub unit76, for example, up, down, right or left, the sub unit 76 acts asoperation input means for making an input in accordance with the motionor direction of the player's hand. Owing to this arrangement, the playerholding different units with his/her right hand and left hand can makeinputs by moving both of his/her hands. The core unit 70 and the subunit 76, which are obtained by dividing a conventional game controller,allow the player to move both of his/her hands freely and to make newoperations which are not possible with the conventional game controller.Since the degree of freedom of operations which can be made on thecontroller 7 is also significantly improved, realistic game operationscan be realized.

In the above example, the controller 7 and the game apparatus 3 areconnected with each other by wireless communication. Alternatively, thecontroller 7 and the game apparatus 3 may be electrically connected witheach other via a cable. In this case, a cable connected to the core unit70 is connected to a connection terminal of the game apparatus 3.

In the above example, the connection section 75 is provided in the coreunit 70, but not in the sub unit 76 included in the controller 7.Alternatively, the sub unit 76 may include a communication section fortransmitting transmission data to the receiving unit 6 wirelessly or ina wired manner. Still alternatively, the core unit 70 and the sub unit76 may both include a communication section. For example, thecommunication section included in each of the core unit 70 and the subunit 76 may wirelessly transmit transmission data to the receiving unit6. The communication section in the sub unit 76 may wirelessly transmittransmission data to the core unit 70, and upon receiving thetransmission data, the communication section 75 in the core unit 70 maywirelessly transmit transmission data of the core unit 70 and thetransmission data from the sub unit 76 to the receiving unit 6. In thesecases, the connection cable 79 is not necessary for electricallyconnecting the core unit 70 and the sub unit 76 with each other.

In the above example, the receiving unit 6 is connected to theconnection terminal of the game apparatus 3 as receiving means forreceiving transmission data wirelessly transmitted from the controller7. The receiving means may be a receiving module provided in the gameapparatus 3. In this case, the transmission data received by thereceiving module is output to the CPU 30 via a predetermined bus.

Hereinafter, various embodiments which are realized by the game system 1will be described. For easier understanding, the core unit 70 will bereferred to as a “first unit”, the sub unit 76 will be referred to as a“second unit”, the acceleration sensor 701 included in the core unit 70will be referred to as a “first acceleration sensor”, and theacceleration sensor 761 included in the sub unit 76 will be referred toas a “second acceleration sensor”.

First Embodiment

FIG. 8 shows an exemplary image displayed in a first embodiment. On thescreen of the monitor 2, a three-dimensional virtual game worldincluding a character operated by the player (game object) is displayed.In this embodiment, the character is riding on a battle tank. The playercan control the motion of the character by inclining the first unit orthe second unit (i.e., rotating the first unit or the second unit arounda horizontal axis thereof). The following description will be given withthe premise that a positive X axis direction of the acceleration sensoris a horizontal direction and the rightward direction with respect tothe player, a positive Y axis direction is the vertical downwarddirection, and a positive Z axis direction is a horizontal direction andthe forward direction with respect to the player. The relationshipbetween the axial directions regarding the acceleration sensor and thedirections in the real world is not limited to such a premise.

FIG. 9 shows an exemplary correspondence between the operation performedby the player and the motion of the character in the first embodiment.When the first unit is inclined farther (FIG. 16) from the player thanthe second unit, the character curves leftward; whereas when the secondunit is inclined farther from the player than the first unit, thecharacter curves rightward. When the first unit and the second unit areinclined farther from the player on average (i.e., the average of theinclinations of the first unit and the second unit is farther from theplayer) with respect to the reference posture (for example, the posturevertical to the ground), the character advances; whereas when the firstunit and the second unit are inclined closer (see FIG. 16) to the playeron average with respect to the reference posture, the characterretracts. In FIG. 9, the direction from the eye of the observer of thedrawing toward the sheet of the paper is the advancing direction(forward direction) of the character, and the opposite direction is theretracting direction (rearward direction) of the character.

FIG. 10 shows an exemplary memory map of the main memory 33 in the firstembodiment. The main memory 33 stores a game program 100, game imagedata 102, character control data 104, a first inclination value 106, asecond inclination value 108, a first reference value 110, and a secondreference value 112. The game program and the game image data 102 arestored on the optical disc 4, and are copied onto the main memory 33 foruse when necessary. The first reference value 110 and the secondreference value 112 may also be stored on the optical disc 4, and may becopied onto the main memory 33 for use when necessary.

The game image data 102 is data for generating a game image (polygondata, texture data, etc.) and includes data for generating a characterimage and data for generating a background image.

The character control data 104 is data for controlling a character, andincludes current position data representing the current position of thecharacter in the game world (three-dimensional virtual space), velocitydata representing the magnitude of the moving speed of the character,and a directional vector representing the advancing direction of thecharacter. The current position data is represented by athree-dimensional coordinate value, the velocity data is represented bya scalar value, and the directional vector is represented by athree-dimensional unit vector. Instead of the velocity data, a velocityvector may be used.

The first inclination value 106 represents an inclination of the firstunit detected based on an output value from the first accelerationsensor. The second inclination value 108 represents an inclination ofthe second unit detected based on an output value from the secondacceleration sensor. The first reference value 110 is a reference valuefor the inclination of the first unit. The second reference value 112 isa reference value for the inclination of the second unit.

With reference to the flowcharts in FIG. 11 through FIG. 14, a flow ofprocessing executed by the CPU 30 based on the game program 100 will bedescribed.

Referring to FIG. 11, when the execution of the game program 100 isstarted, the CPU 30 first executes neutral position setting processingin step S100. The neutral position setting processing is for determiningthe reference value for the inclination of the first unit (firstreference value 110) and the reference value for the inclination of thesecond unit (second reference value 112). Hereinafter, with reference toFIG. 12, the neutral position setting processing will be described indetail.

Referring to FIG. 12, in step S134, the CPU 30 determines whether or notthe player has pressed a setting button (a button for allowing theplayer to set the neutral position) based on the operation informationtransmitted from the controller 7. The setting button may be providedonly in the first unit, only in the second unit or both in the firstunit and the second unit. The neutral position may be set by the playeruttering a voice to a microphone instead of pressing the setting button.In this embodiment, the setting button is provided in the first unit.When it is detected that the player has pressed the setting button, theprocessing is advanced to step S136. When it is not detected that theplayer has pressed the setting button, the processing in step S134 isrepeated (i.e., the CPU 30 waits until the player presses the settingbutton).

In step S136, the CPU 30 waits for a certain time period (for example,10 frames). The reason for this is that immediately after the playerleaves his/her fingers from the setting button, the operation unitincluding the setting button (in this embodiment, the first unit) maypossibly swing, in which case the first reference value is not correctlyset.

In step S138, an output value (output vector) from the firstacceleration sensor is obtained. In this embodiment, the output value inthe X axis direction from the first acceleration sensor is Ax1, theoutput value in the Y axis direction from the first acceleration sensoris Ay1, and the output value in the Z axis direction from the firstacceleration sensor is Az1. The output value may be set to be used asfollows. Output values from the acceleration sensor for a predeterminedtime period (e.g., about 3 seconds) are always stored. When the playerpresses the setting button, the output value which was output apredetermined time period before may be used, or an average of theoutput values for a certain time period before or after the playerpresses the setting button may be used (this is also applicable to thesecond acceleration sensor).

In step S140, it is determined whether or not the magnitude of theoutput vector (Ax1, Ay1, Az1) from the first acceleration sensorobtained in step S138 (i.e., √(Ax1 ²+Ay1 ²+Az1 ²) is within the range of0.8 to 1.2, namely, whether or not the first unit is in a still state.The output vector from each of the first acceleration sensor and thesecond acceleration sensor is set to have a magnitude of 1.0 in a stillstate (i.e., in a state of being influenced only by the gravitationalacceleration). Therefore, when the magnitude of the output vector fromthe first acceleration sensor is 1.0 or closer thereto, the first unitcan be determined to be substantially still. By contrast, when themagnitude of the output vector from the first acceleration sensor is farfrom 1.0, the first unit can be determined to be moving. When themagnitude of the output vector from the first acceleration sensor iswithin the range of 0.8 to 1.2, the processing is advanced to step S142.When the magnitude of the output vector from the first accelerationsensor is not within the range of 0.8 to 1.2, the processing is returnedto step S134. The reason is that when the first unit is moving, thefirst reference value cannot be correctly set. The range of 0.8 to 1.2is exemplary. The determination in step S140 is whether or not themagnitude of the output vector is substantially close to 1.0. In thisembodiment, the X direction component of the acceleration sensor (Ax) isnot used. Therefore, the player basically plays without inclining thecontroller 7 in the X direction. Therefore, when the X directioncomponent of the output from the first acceleration sensor obtained instep S138 is larger than a certain value, the processing may be returnedto step S134 for the reason that the neutral position is not appropriate(this is also applicable to the second acceleration sensor).

In step S142, an output value (output vector) from the secondacceleration sensor is obtained. In this embodiment, the output value inthe X axis direction from the second acceleration sensor is Ax2, theoutput value in the Y axis direction from the second acceleration sensoris Ay2, and the output value in the Z axis direction from the secondacceleration sensor is Az2.

In step S144, it is determined whether or not the magnitude of theoutput vector (Ax2, Ay2, Az2) from the second acceleration sensorobtained in step S142 (i.e., √(Ax2 ²+Ay2 ²+Az2 ²) is within the range of0.8 to 1.2, i.e., whether or not the second unit is in a still state.When the magnitude of the output vector from the second accelerationsensor is within the range of 0.8 to 1.2, the processing is advanced tostep S146. When the magnitude of the output vector from the secondacceleration sensor is not within the range of 0.8 to 1.2, theprocessing is returned to step S134. The reason is that when the secondunit is moving, the second reference value cannot be correctly set.

In step S146, arctan (Az1/Ay1), which represents the inclination of thefirst unit around the X axis (horizontal axis) (such an inclination isrepresented by angle θ in FIG. 16), is calculated, and the calculatedvalue is set as the first reference value 110. Similarly, arctan(Az2/Ay2), which represents the inclination of the second unit aroundthe X axis (such an inclination is represented by angle θ in FIG. 16),is calculated, and the calculated value is set as the second referencevalue 112. (Ay1, Az1) may be set as a reference value.

In this embodiment, the first reference value 110 is set only based onthe output value from the first acceleration sensor obtained in stepS138. Alternatively, output values from the first acceleration sensormay be obtained at a plurality of different times, and the firstreference value 110 may be set based on an average thereof. Owing tosuch an arrangement, even if the first unit is swinging when the neutralposition is set, the influence of such a swing can be suppressed. Thisis also applicable to the second reference value 112.

In step S148, it is determined whether or not the difference between thefirst reference value 110 and the second reference value 112 is within apredetermined value. When the difference between the first referencevalue 110 and the second reference value 112 is within the predeterminedvalue, the neutral position setting processing is terminated, and theprocessing is returned to step S102 in FIG. 11. When the differencebetween the first reference value 110 and the second reference value 112exceeds the predetermined value, the processing is returned to step S134to re-set the first reference value 110 and the second reference value112.

The reason why the first reference value 110 and the second referencevalue 112 are re-set when the difference therebetween exceeds thepredetermined value in step S148 is that when the first reference value110 and the second reference value 112 having such values are used forthe game, a high operability is not expected to be obtained. Morespecifically, in this embodiment, as shown in FIG. 9, when the firstunit is inclined farther from the player than the second unit, thecharacter curves leftward; whereas when the second unit is inclinedfarther from the player than the first unit, the character curvesrightward. When the first reference value 110 and the second referencevalue 112 are largely different from each other, even when the firstunit and the second unit are inclined parallel to each other, thecharacter may curve leftward or rightward. This makes the player feelunnatural.

In the case of a game in which a large difference between the firstreference value 110 and the second reference value 112 does not presentany serious problem, the determination in step S148 may be omitted.

In this embodiment, when the player presses the setting button providedin the first unit, the first reference value 110 and the secondreference value 112 are both set. The present invention is not limitedto this. For example, the following arrangement is possible in the casewhere the first unit and the second unit each have a setting button.When the player presses the setting button provided in the first unit,the first reference value 110 is set; and then when the player pressesthe setting button provided in the second unit, the second referencevalue 112 is set. In this case, however, the first reference value 110and the second reference value 112 are likely to be largely differentfrom each other. Therefore, it is preferable that the first referencevalue 110 and the second reference value 112 are set substantially atthe same time as in this embodiment.

In this embodiment, the first reference value 110 and the secondreference value 112 are separately set. In order to avoid theunnaturalness described above, a common value may be set as the firstreference value 110 and the second reference value 112. For example, anaverage of arctan (Az1/Ay1) and arctan (Az2/Ay2) may be commonly set asthe first reference value 110 and the second reference value 112 in stepS146. Alternatively, either arctan (Az1/Ay1) or arctan (Az2/Ay2) may becalculated, and such a calculation result may be commonly set as thefirst reference value 110 and the second reference value 112. In thiscase, in order to avoid the influence of the swing of the operation unitwhen the player presses the setting button, it is preferable to commonlyset the first reference value 110 and the second reference value 112based on the output value from the acceleration sensor in the operationunit which does not include the setting button pressed by the player.

Returning to FIG. 11, when the neutral position setting processing isterminated, in step S102, the CPU 30 initializes various data used forthe game processing (character control data 104, inclination value 106,etc.), and generates and displays a game image including the characteron the screen of the monitor 2.

In step S104, an inclination of the first unit is detected. Hereinafter,the detection of the inclination will be described in detail withreference to FIG. 14.

Referring to FIG. 14, in step S154, an output value (output vector) fromthe acceleration sensor (here, the first acceleration sensor) isobtained. In this embodiment, the output value in the X directioncomponent from the acceleration sensor is Ax1, the output value in the Ydirection component from the acceleration sensor is Ay1, and the outputvalue in the Z direction component from the acceleration sensor is Az1.

In step S156, it is determined whether or not the magnitude of theoutput vector (Ax1, Ay1, Az1) from the first acceleration sensorobtained in step S154 (i.e., √(Ax1 ²+Ay1 ²+Az1 ²) is within the range of0.8 to 1.2, namely, whether or not the first unit is in a still state.When the magnitude of the output vector from the first accelerationsensor is within the range of 0.8 to 1.2, the processing is advanced tostep S158. When the magnitude of the output vector from the firstacceleration sensor is not within the range of 0.8 to 1.2, theprocessing is advanced to step S160.

In step S158, arctan (Az1/Ay1), which represents the inclination of thefirst unit around the X axis (such an inclination is represented byangle θ in FIG. 16), is calculated, and the calculated value is returnedas a return value for the detection of the inclination. The return valueis stored on the main memory 33 as the first return value 106. Then, theprocessing is advanced to step S106 in FIG. 11.

In step S160, an error is returned as the detection result of theinclination for the reason that when the first unit is moving, theinclination of the first unit cannot be correctly detected. Then, thedetection of the inclination is terminated. The processing is advancedto step S106 in FIG. 11.

In step S106, it is determined whether or not the detection result ofthe inclination in step S104 is an error. When the result is an error,the processing is advanced to step S150 in FIG. 13. When the result isnot an error, the processing is advanced to step S108.

In step S108, the detection of the inclination is performed regardingthe second unit similarly to step S104. Specifically, when the magnitudeof the output vector from the second acceleration sensor (Ax2, Ay2, Az2)is within the range of 0.8 to 1.2, the value of arctan (Az2/Ay2), whichrepresents the inclination of the second unit around the X axis (such aninclination is represented by angle θ in FIG. 16), is stored on the mainmemory 33 as the second inclination value 108.

In step S110, it is determined whether or not the detection result ofthe inclination in step S108 is an error. When the result is an error,the processing is advanced to step S150 in FIG. 13. When the result isnot an error, the processing is advanced to step S112.

In step S112, the first inclination value 106 is corrected based on thefirst reference value 110. Specifically, the difference between thefirst inclination value 106 and the first reference value 110 iscalculated, and the calculation result is stored on the main memory 33to update the first inclination value 106.

In step S114, the second inclination value 108 is corrected based on thesecond reference value 112. Specifically, the difference between thesecond inclination value 108 and the second reference value 112 iscalculated, and the calculation result is stored on the main memory 33to update the second inclination value 108.

In step S116, it is determined whether or not the value obtained bysubtracting the second inclination value 108 from the first inclinationvalue 106 is larger than 51 (positive threshold value). When the valueobtained by subtracting the second inclination value 108 from the firstinclination value 106 is larger than 51 (i.e., when the first unit isinclined farther from the player than the second unit), the processingis advanced to step S118. Otherwise, the processing is advanced to stepS120.

In step S118, the directional vector is changed so as to cause thecharacter to curve leftward. The directional vector can be changed byvarious methods. In this embodiment, for example, the method shown inFIG. 15 is used. A leftward curve vector, which is perpendicular both tothe normal vector to the ground and to the current directional vector atthe current position of the character and has a predetermined magnitude,is obtained. The leftward curve vector and the current directionalvector are synthesized to obtain a synthesized vector. A unit vectorhaving the same direction as the synthesized vector is determined as anew directional vector.

In step S120, it is determined whether or not the value obtained bysubtracting the second inclination value 108 from the first inclinationvalue 106 is smaller than −51. When the value obtained by subtractingthe second inclination value 108 from the first inclination value 106 issmaller than −51 (i.e., when the second unit is inclined farther fromthe player than the first unit), the processing is advanced to stepS122. Otherwise, the processing is advanced to step S124.

In step S122, the directional vector is changed so as to cause thecharacter to curve rightward.

In step S124, it is determined whether or not the average value of thefirst inclination value 106 and the second inclination value 108 islarger than S2 (positive threshold value). When the average value of thefirst inclination value 106 and the second inclination value 108 islarger than S2 (i.e., when the first unit and the second unit areinclined farther from the player on average with respect to thereference posture), the processing is advanced to step S126. Otherwise,the processing is advanced to step S128.

In step S126, positive velocity data is set in accordance with theaverage value of the first inclination value 106 and the secondinclination value 108. For example, positive velocity data having anabsolute value in proportion to the average value is set. Then, theprocessing is advanced to step S150 in FIG. 13.

In step S128, it is determined whether or not the average value of thefirst inclination value 106 and the second inclination value 108 issmaller than −S2. When the average value of the first inclination value106 and the second inclination value 108 is smaller than −S2 (i.e., whenthe first unit and the second unit are inclined closer to the player onaverage with respect to the reference posture), the processing isadvanced to step S130. Otherwise, the processing is advanced to stepS132.

In step S130, negative velocity data is set in accordance with theaverage value of the first inclination value 106 and the secondinclination value 108. For example, negative velocity data having anabsolute value in proportion to the average value is set. Then, theprocessing is advanced to step S150 in FIG. 13.

In step S132, the velocity data is set to 0, and the processing isadvanced to step S150 in FIG. 13.

Referring to FIG. 13, in step S150, the current position data is updatedbased on the velocity data and the directional vector. As a result, thecharacter in the game world moves by the distance represented by thevelocity data in the direction represented by the directional vector.

In step S152, the game image displayed on the monitor 2 is updated basedon the current position data, and the processing is returned to stepS104 in FIG. 11. The above-described processing is repeated, so that thegame image is changed when necessary in accordance with the operationperformed by the player.

As described above, according to this embodiment, the player can freelymove both of his/her hands. Owing to a high degree of freedom of motionrealized by such an arrangement, a dynamic play is made possible. Inaddition, the character can be controlled by the inclination differencebetween two operation units. Therefore, the player can play intuitivelyand thus obtain a high operability.

In this embodiment, three-axial acceleration sensors are used. Even whenone-axial acceleration sensors are used, the inclinations of theoperation units can be detected (for example, the inclinations of theoperation units can be detected by referring to only the output value inthe Z axis direction in FIG. 16). Thus, substantially the same effectsas those of this embodiment are provided.

In this embodiment, the inclination difference between the first unitand the second unit, and the average inclination value of the first unitand the second unit, are used to control the motion of the character. Itis possible to use only the difference without using the average value.Hereinafter, a modification to the first embodiment in which only theinclination difference between the first unit and the second unit willbe described.

FIG. 17 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in themodification to the first embodiment. When the first unit is inclinedfarther from the player than the second unit, the character curvesleftward; whereas when the second unit is inclined farther from theplayer than the first unit, the character curves rightward. When anacceleration button is pressed, the character's motion is accelerated inthe advancing direction at that time.

With reference to FIG. 18, a flow of processing executed by the CPU 30in the modification to the first embodiment will be described. In FIG.18, substantially the same processing as that in FIG. 11 will bear thesame reference numerals and the descriptions thereof will be omitted.

Before step S162, the character curves leftward or rightward inaccordance with the inclination difference between the first unit andthe second unit.

In step S162, the CPU 30 determines whether or not the player haspressed the acceleration button. The acceleration button may be providedonly in the first unit, only in the second unit or both in the firstunit and the second unit. When the player has pressed the accelerationbutton, the processing is advanced to step S164. When the player has notpressed the acceleration button, the processing is advanced to stepS166.

In step S164, the velocity data is increased by a predetermined amount.

In step S166, the velocity data is decreased by a predetermined amount.

After step S164 or S166, substantially the same processing as that inFIG. 13 is executed.

As described above, according to this modification, the game can beplayed only using the inclination difference between the first unit andthe second unit, without using any absolute value of the inclination ofthe first unit or the second unit. Therefore, the player can play thegame with no problem even while lying on the floor. Thus, the degree offreedom of posture during the game is increased.

Second Embodiment

FIG. 19 shows an exemplary image displayed in a second embodiment. Onthe screen of the monitor 2, a three-dimensional virtual game worldincluding a character operated by the player (game object) is displayed.In this embodiment, the character is riding on a sleigh, which is pulledby five dinosaurs (dinosaurs A through E). The player can control themotion of the character by swinging the first unit or the second unit.The following description will be given with the premise that the playerholds the first unit with his/her left hand and holds the second unitwith his/her right hand (the player may hold the first unit with his/herright hand and hold the second unit with his/her left hand).

FIG. 20 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in the secondembodiment. When only the first unit is swung, the character curvesrightward (the advancing direction is changed rightward); whereas whenonly the second unit is swung, the character curves leftward (theadvancing direction is changed leftward). When the first unit and thesecond unit are swung simultaneously, the character's motion isaccelerated in the advancing direction at that time.

The game may be set such that when only the first unit is swung, thecharacter advances leftward; when only the second unit is swung, thecharacter advances rightward; and when the first unit and the secondunit are swung at the same time, the character advances forward.

FIG. 21 shows an exemplary memory map of the main memory 33 in thesecond embodiment. The main memory 33 stores a game program 200, gameimage data 202, character control data 204, a first swinging strengthvalue 206, a second swinging strength value 208, a first input flag 210,a second input flag 212, a simultaneous input flag 214, a first timer216, a second timer 218, and a simultaneous input timer 220.

The game image data 202 and the character control data 204 aresubstantially the same as those in the first embodiment and will not bedescribed here.

The first swinging strength value 206 represents a swinging strength ofthe first unit which is detected based on the output value from thefirst acceleration sensor. The second swinging strength value 208represents a swinging strength of the second unit which is detectedbased on the output value from the second acceleration sensor.

The first flag 210 is a flag representing that the first unit has beenswung, and is turned on when the first unit is detected to have beenswung. The second flag 212 is a flag representing that the second unithas been swung, and is turned on when the second unit is detected tohave been swung. The simultaneous input flag 214 is a flag representingthat the first flag and the second unit have been swung simultaneously,and is turned on when the first flag and the second unit are detected tohave been swung simultaneously.

The first timer 216 is a value representing a time period from when thefirst unit is detected to have been swung (the number of frames). Thesecond timer 218 is a value representing a time period from when thesecond unit is detected to have been swung (the number of frames). Thesimultaneous input timer 220 is a value representing a time period fromwhen the first unit and the second unit are detected to have been swungsimultaneously (the number of frames).

With reference to the flowcharts in FIG. 22 through FIG. 25, a flow ofprocessing executed by the CPU 30 based on the game program 200 will bedescribed. The processing in steps S202 through S266 is repeated frameby frame.

Referring to FIG. 22, when the execution of the game program 200 isstarted, in step S200, the CPU 30 first initializes various data usedfor the game processing (character control data 204, first swingingstrength value 206, first input flag 210, first timer 216, etc.), andgenerates and displays a game image including the character on thescreen of the monitor 2.

In step S202, it is determined whether or not the simultaneous inputflag 214 is on. When the simultaneous input flag 214 is on, theprocessing is advanced to step S204. When the simultaneous input flag214 is not on, the processing is advanced to step S210.

In step S204, “1” is added to the simultaneous input timer 220.

In step S206, it is determined whether or not the simultaneous inputtimer 220 is equal to or greater than 20. When the simultaneous inputtimer 220 is equal to or greater than 20, the processing is advanced tostep S208. Otherwise, the processing is advanced to step S262 in FIG.24.

In step S208, the simultaneous input flag 214 is turned off, and theprocessing is advanced to step S262 in FIG. 24.

As described above, after the simultaneous input flag 214 is turned on(i.e., after the first unit and the second unit are detected to havebeen swung simultaneously) until a 20 frame time period passes, neitherthe detection of the swinging strength of the first unit (step S236described later) nor the detection of the swinging strength of thesecond unit (step S250 described later) is performed. Namely, neitherthe swing operation on the first unit nor the swing operation on thesecond unit by the player is accepted. Owing to such an arrangement, oneswing operation performed by the player is prevented from being detectedcontinuously over a period of a plurality of frames.

In step S210, it is determined whether or not the first input flag 210is on. When the first input flag 210 is on, the processing is advancedto step S212. When the first input flag 210 is not on, the processing isadvanced to step S222.

In step S212, “1” is added to the first timer 216.

In step S214, it is determined whether or not the first timer 216 is 5.When the first timer 216 is 5 (i.e., when a 5 frame time period haspassed after the first unit is detected to have been swung, without anyswing of the second unit being detected; namely, when only the firstunit was swung), the processing is advanced to step S216. When the firsttimer 216 is not 5, the processing is advanced to step S218.

In step S216, the directional vector is changed so as to cause thecharacter to curve rightward. The directional vector can be changed insubstantially the same manner as in the first embodiment.

In step S218, it is determined whether or not the first timer 216 islarger than 10. When the first timer 216 is larger than 10, theprocessing is advanced to step S220. When the first timer 216 is notlarger than 10, the processing is advanced to step S222.

In step S220, the first input flag 210 is turned off.

As described above, after the first input flag 210 is turned on (i.e.,after the first unit is detected to have been swung) until a 10 frametime period passes, the detection of the swinging strength of the firstunit (step S236 described later) is not performed. Namely, the swingoperation on the first unit by the player is not accepted. Owing to suchan arrangement, one swing operation performed by the player is preventedfrom being detected continuously over a period of a plurality of frames.

As described in more detail later, when the second unit is detected tohave been swung before a 5 frame time period passes after the firstinput flag 210 is turned on, the simultaneous input flag 214 is turnedon at that time. Therefore, until a 20 frame time period passes afterthat, the swing operation on the first unit performed by the player isnot accepted. When the simultaneous input flag 214 is turned off, thedetection of the swinging strength of the first unit (step S236described later) and the detection of the swinging strength of thesecond unit (step S250 described later) are resumed simultaneously.Therefore, the timing at which the acceptance of the swing operation onthe first unit is resumed, and the timing at which the acceptance of theswing operation on the second unit is resumed, match each other.

In step S222, it is determined whether or not the second input flag 212is on. When the second input flag 212 is on, the processing is advancedto step S224. When the second input flag 212 is not on, the processingis advanced to step S234 in FIG. 23.

In step S224, “1” is added to the second input timer 218.

In step S226, it is determined whether or not the second timer 218 is 5.When the second timer 218 is 5 (i.e., when only the second unit wasswung), the processing is advanced to step S228. When the second timer218 is not 5, the processing is advanced to step S230.

In step S228, the directional vector is changed so as to cause thecharacter to curve leftward.

In step S230, it is determined whether or not the second timer 218 islarger than 10. When the second timer 218 is larger than 10, theprocessing is advanced to step S232. When the second timer 218 is notlarger than 10, the processing is advanced to step S234 in FIG. 23.

In step S232, the second input flag 212 is turned off.

As described above, after the second input flag 212 is turned on (i.e.,after the second unit is detected to have been swung) until a 10 frametime period passes, the detection of the swinging strength of the secondunit (step S250 described later) is not performed. Namely, the swingoperation on the second unit by the player is not accepted. Owing tosuch an arrangement, one swing operation performed by the player isprevented from being detected continuously over a period of a pluralityof frames.

As described in more detail later, when the first unit is detected tohave been swung before a 5 frame time period passes after the secondinput flag 212 is turned on, the simultaneous input flag 214 is turnedon at that time. Therefore, until a 20 frame time period passes afterthat, the swing operation on the second unit performed by the player isnot accepted. When the simultaneous input flag 214 is turned off, thedetection of the swinging strength of the first unit (step S236described later) and the detection of the swinging strength of thesecond unit (step S250 described later) are resumed simultaneously.Therefore, the timing at which the acceptance of the swing operation onthe first unit is resumed, and the timing at which the acceptance of theswing operation on the second unit is resumed, match each other. Inother words, in this embodiment, even when the timing at which the firstunit is detected to have been swung is slightly offset with respect tothe timing at which the second unit is detected to have been swung, itis recognized that the first unit and the second unit were swungsimultaneously. Even in this case, the timing at which the acceptance ofthe swing operation on the first unit is resumed, and the timing atwhich the acceptance of the swing operation on the second unit isresumed, match each other. Therefore, when the simultaneous swingoperation is resumed and then another simultaneous swing operation isperformed, the problem that it is detected that only the first unit orthe second unit has been swung the second time is avoided. The timeperiod in which the swing is not accepted (swing acceptance prohibitiontime period) after the simultaneous input flag 214 is turned on may be a10 frame time period (same as the swing acceptance prohibition timeperiod after only the first unit or only the second unit is swung). Inthis embodiment, such a period starts when a later swing operation isdetected, among the swing operation on the first unit and the swingoperation on the second unit. Alternatively, a period of, for example,20 frames may start when an earlier swing operation is detected. Stillalternatively, such a period may start at an intermediate timing (atiming between the timing at which an earlier swing operation isdetected and the timing at which a later swing operation is detected;for example, exactly the middle timing N).

Referring to FIG. 23, in step S234, it is determined whether or not thefirst input flag 210 is on. When the first input flag 210 is on, theprocessing is advanced to step S248. When the first input flag 210 isnot on, the processing is advanced to step S236.

In step S236, the swinging strength of the first unit is detected.Hereinafter, the detection of the swinging strength of the first unitwill be described in detail with reference to FIG. 25.

Referring to FIG. 25, in step S268, an output value (output vector) froman acceleration sensor (here, the first acceleration sensor) isobtained. In this embodiment, the output value in the X axis directionfrom the first acceleration sensor is Ax, the output value in the Y axisdirection from the first acceleration sensor is Ay, and the output valuein the Z axis direction from the first acceleration sensor is Az.

In step S270, it is determined whether or not the magnitude of theoutput vector (Ax, Ay, Az) from the first acceleration sensor obtainedin step S268 (i.e., √(Ax²+Ay²+Az²) is larger than K (K is apredetermined value). When the magnitude of the output vector from thefirst acceleration sensor is larger than K (it is determined that aswing operation has been performed), the processing is advanced to stepS272. When the magnitude of the output vector from the firstacceleration sensor is not larger than K (it is determined that a swingoperation has not been performed), the processing is advanced to stepS274.

In step S272, the magnitude of the output vector from the firstacceleration sensor is returned as a return value X for the detection ofthe swinging strength. Usually, as the first unit is swung morestrongly, the magnitude of the output vector from the first accelerationsensor is larger. Therefore, the return value X reflects the swingingstrength of the first unit. Then, the processing is advanced to stepS238 in FIG. 23. In this embodiment, when the magnitude of the outputvector exceeds K, the magnitude of the output vector at that time isimmediately returned as the return value X. In a modification, thefollowing processing may be executed. When the magnitude of the outputvector exceeds K, a state flag indicating such a state is stored; andthe output vector value when the magnitude of the output vector reachesthe maximum value (the point at which the magnitude of the output vectorstarts decreasing after being maximized) may be returned.

In this embodiment, the determination on the swing operation is madebased on the magnitude of the output vector being equal to or greaterthan a predetermined value. The determination may be performed moreprecisely. This will be described in more detail. When a swing operationis made, the output from the acceleration sensor usually changes asfollows. (a) 0→(b) output is increased→(c) maximum→(d) output isdecreased→(e) 0→(f) output is increased in the opposite direction→(g)maximum in the opposite direction→(h) output is decreased in theopposite direction→(i) 0.

The history of output values for a predetermined time period from thecurrent point may be always stored, so that it can be detected whetheror not the history shows such a change. More simply, it may be detectedthat the history matches a part of such a change. In this case, whichpart of the change from (a) through (i) is to be used may be determinedarbitrarily (any point other than (a) through (i), for example, a pointwhen the output reaches a predetermined value while being increased, maybe used).

Instead of the swing operation, a predetermined motion (an operation forproviding a motion of a predetermined pattern) may be detected. Such anoperation is, for example, an operation for moving the character in apredetermined direction. In this case also, the history of output valuesis stored, so that it can be detected whether or not the history matchesthe predetermined pattern.

The above-described modification is also applicable to embodiments otherthan the second embodiment.

In step S274, a value representing “no swing operation” is returned asthe detection result of the swing operation. Then, the processing isadvanced to step S238 in FIG. 23.

In step S238, it is determined whether or not the first unit was swungbased on the detection result of the swing operation in step S236. Whenthe first unit was swung, the processing is advanced to step S240. Whenthe first unit was not swung, the processing is advanced to step S248.

In step S240, it is determined whether or not the second input flag 212is on and also whether or not the second timer 218 is equal or smallerthan 4. When the second input flag 212 is on and also the second timer218 is equal or smaller than 4 (i.e., when the first unit and the secondunit were swung substantially simultaneously), the processing isadvanced to step S242. When the second input flag 212 is not on, or thesecond timer 218 is larger than 4, the processing is advanced to stepS246. When the first unit is swung before a 4 frame time period passesafter the second unit is swung, it is determined that “the first unitand the second unit were swung simultaneously” for the following reason.Even if the player intended to swing the first unit and the second unitsimultaneously, such swing operations may not necessarily be performedexactly simultaneously. Even when the timing at which the first unit isdetected to have been swung is offset by several frames with respect tothe timing at which the second unit is detected to have been swung, itis determined that “the first unit and the second unit were swungsimultaneously”. Thus, a better operability is obtained.

In step S242, the velocity data of the character is increased inaccordance with the return value X for the detection of the swingingstrength of the first unit in step S236 (value reflecting the swingingstrength of the first unit) and the second swinging strength value 208which is set in step S260 described later (value reflecting the swingingstrength of the second unit). For example, the current velocity data maybe multiplied by a numerical value in proportion to the return value Xand by a numerical value in proportion to the second swinging strengthvalue 208 so as to determine new velocity data. Alternatively, anumerical value obtained by multiplying the return X by a firstcoefficient, and a numerical value obtained by multiplying the secondswinging strength 208 by a second coefficient, may be added to thecurrent velocity data (the first coefficient may be the same as, ordifferent from, the second coefficient). Still alternatively, an averageof the return value X and the second swinging strength value 208 ismultiplied by a predetermined coefficient, and the resultant value maybe added to the current velocity data.

As the return value for the detection of the swinging strength, themagnitude of only the component in a predetermined direction may be usedamong the output values from the acceleration sensor.

In step S244, the simultaneous input flag 214 is turned on. Thesimultaneous input timer 220 is reset to 0 to resume. The second inputflag 212 is turned off.

In step S246, the first input flag 210 is turned on. The first inputtimer 216 is reset to 0 to resume. The return value X for the detectionof the swinging strength of the first unit is set as the first swingingstrength value 206.

In step S248, it is determined whether or not the second input flag 212is on. When the second input flag 212 is on, the processing is advancedto step S250. When the second input flag 212 is not on, the processingis advanced to step S262 in FIG. 24.

In step S250, the swinging strength of the second unit is detected insubstantially the same manner as in step S236. Namely, when themagnitude of the output vector from the second acceleration sensor islarger than K, the magnitude of the output vector from the secondacceleration sensor (value reflecting the swinging strength of thesecond unit) is returned as a return value X for the detection of theswinging strength.

In step S252, it is determined whether or not the second unit was swungbased on the detection result of the swing operation in step S250. Whenthe second unit was swung, the processing is advanced to step S254. Whenthe second unit was not swung, the processing is advanced to step S262in FIG. 24.

In step S254, it is determined whether or not the first input flag 210is on and also whether or not the first timer 216 is equal or smallerthan 4. When the first input flag 210 is on and also the first timer 216is equal or smaller than 4 (i.e., when the first unit and the secondunit were swung substantially simultaneously), the processing isadvanced to step S256. When the first input flag 210 is not on, or thefirst timer 216 is larger than 4, the processing is advanced to stepS260.

In step S256, the velocity data is increased in accordance with thereturn value X for the detection of the swinging strength of the secondunit in step S250 (value reflecting the swinging strength of the secondunit) and the first swinging strength value 206 which was set in stepS246 above (value reflecting the swinging strength of the first unit).For example, the current velocity data may be multiplied by a numericalvalue in proportion to the return value X and by a numerical value inproportion to the first swinging strength value 208 so as to determinenew velocity data.

In step S258, the simultaneous input flag 214 is turned on. Thesimultaneous input timer 220 is reset to 0 to resume. The first inputflag 210 is turned off.

In step S260, the second input flag 212 is turned on. The second inputtimer 218 is reset to 0 to resume. The return value X for the detectionof the swinging strength of the second unit is set as the secondswinging strength value 208.

In step S262 in FIG. 24, the current position data is updated based onthe velocity data and the directional vector. As a result, the characterin the game world moves by the distance represented by the velocity datain the direction represented by the directional vector.

In step S264, the game image displayed on the monitor 2 is updated basedon the current position data.

In step S266, the velocity data is decreased by a predetermined amount.This is performed in order to reflect the influence of the friction ofthe sleigh and the ground on the velocity of the character.

The above-described processing is repeated, so that the game image ischanged when necessary in accordance with the operation performed by theplayer.

As described above, according to this embodiment, the player can freelymove both of his/her hands. Owing to a high degree of freedom of motionrealized by such an arrangement, a dynamic play is made possible. Inaddition, the player can control the character by swinging the operationunits. Therefore, the player can play intuitively and thus obtain a highoperability. As the operation units are swung more strongly, theacceleration of the character is larger. Thus, a more intuitiveoperation is realized.

In this embodiment, three-axial acceleration sensors are used. Even whenone-axial acceleration sensors are used, the swing operations on theoperation units and the swinging strength values thereof can be detected(for example, by referring to only the output value in the Z axisdirection in FIG. 16, it is detected that the operation units wereswung, and the swinging strength values thereof are also detected).Thus, substantially the same effects as those of this embodiment areprovided.

Third Embodiment

An image displayed in a third embodiment is, for example, substantiallythe same as the image shown in FIG. 19. In this embodiment, the playercan control the motion of the character by swinging the first unit orthe second unit.

FIG. 26 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in the thirdembodiment. When the first unit is continuously swung, the charactercurves rightward; whereas when the second unit is continuously swung,the character curves leftward. When the first unit and the second unitare swung alternately, the character's motion is accelerated in theadvancing direction at that time.

FIG. 27 shows an exemplary memory map of the main memory 33 in the thirdembodiment. The main memory 33 stores a game program 300, game imagedata 302, character control data 304, operation history information 306,and a swinging interval timer 308.

The game image data 302 and the character control data 304 aresubstantially the same as those in the first embodiment and will not bedescribed here.

The operation history information 306 is information representing thetype of the operation unit swung by the player (first unit or secondunit) regarding the past two swings.

The swinging interval timer 308 is a value representing a time periodfrom when the player swung the first unit or the second unit immediatelypreviously (the number of frames).

With reference to the flowcharts in FIG. 28 through FIG. 30, a flow ofprocessing executed by the CPU 30 based on the game program 300 will bedescribed.

Referring to FIG. 28, when the execution of the game program 300 isstarted, in step S300, the CPU 30 first initializes various data usedfor the game processing (character control data 304, operation historyinformation 306, swinging interval timer 308, etc.), and generates anddisplays a game image including the character on the screen of themonitor 2.

In step S302, the swinging strength of the first unit is detected.Hereinafter, the detection of the swinging strength of the first unitwill be described in detail with reference to FIG. 30.

Referring to FIG. 30, in step S346, an output value (output vector) froman acceleration sensor (here, the first acceleration sensor) isobtained. In this embodiment, the output value in the X axis directionfrom the first acceleration sensor is Ax, the output value in the Y axisdirection from the first acceleration sensor is Ay, and the output valuein the Z axis direction from the first acceleration sensor is Az.

In step S348, it is determined whether or not the magnitude of theoutput vector (Ax, Ay, Az) from the first acceleration sensor obtainedin step S346 is larger than K (K is a predetermined value). When themagnitude of the output vector from the first acceleration sensor islarger than K, the processing is advanced to step S350. When themagnitude of the output vector from the first acceleration sensor is notlarger than K, the processing is advanced to step S352.

In step S350, a value representing that “a swing operation wasperformed” is returned as the detection result of the swing operation.Then, the processing is advanced to step S304 in FIG. 28.

In step S352, a value representing “no swing operation” is returned asthe detection result of the swing operation. Then, the processing isadvanced to step S304 in FIG. 28.

In step S304, it is determined whether or not the first unit was swungbased on the detection result of the swing operation in step S302. Whenthe first unit was swung, the processing is advanced to step S306. Whenthe first unit was not swung, the processing is advanced to step S318 inFIG. 29.

In step S306, the operation history information 306 is updated.Specifically, the pre-update value of the “operation unit swungcurrently” is set as the “operation unit swung immediately previously”,and then the value representing the first unit is set as the “operationunit swung currently”.

In step S308, the swinging interval timer 308 is reset to 0.

In step S310, it is determined whether or not the swing operationdetected currently is “the first swing of the continuous swingoperation”. Specifically, the operation history information 306 isreferred to. When neither the value representing the first unit nor thevalue representing the second unit is stored in the “operation unitswung immediately previously”, it is determined that the swing operationdetected currently is “the first swing of the continuous swingoperation”. In this embodiment, when the interval between theimmediately previous swing operation and the current swing operationexceeds a 60 frame time period, it is determined that the swingoperation detected currently is “the first swing of the continuous swingoperation”. When the swing operation detected currently is “the firstswing of the continuous swing operation”, the processing is advanced tostep S318 in FIG. 29. Otherwise, the processing is advanced to stepS312.

In step S312, it is determined whether or not the operation unit swungimmediately previously is the first unit, by referring to the operationhistory information 306. When the operation unit swung immediatelypreviously is the first unit (i.e., when the first unit is continuouslyswung), the processing is advanced to step S316. When the operation unitswung immediately previously is not the first unit (i.e., when theoperation unit swung immediately previously is the second unit; namely,the first unit and the second unit are swung alternately), theprocessing is advanced to step S314.

In step S314, the velocity data is increased by a predetermined amount.In a modification, the following processing may be executed. When theswing operation of the first unit is detected in step S302, the swingingstrength is also detected as in the second embodiment. The velocity datais increased more largely as the swinging strength is greater.Alternatively, the swinging strength when the operation unit was swungimmediately previously is stored, and the velocity data is increasedbased both on the immediately previous swinging strength and the currentswinging strength of the first unit. (For example, the increasing amountof the velocity data is determined based on the sum or average of thetwo swinging strength values. A weighted average may be used; forexample, the coefficient is decreased as the swinging strength data isolder.) Still alternatively, as long as the first unit and the secondunit are continuously swung alternately, the increasing amount of thevelocity data is determined based on the sum or average of the swingingstrength values of such a plurality of swings.

In step S316, the directional vector is changed so as to cause thecharacter to curve rightward. In this step also, the followingprocessing may be executed. As the swinging strength is greater, thecharacter may curve at a larger angle. Alternatively, the swingingstrength when the operation unit was swung immediately previously isstored, and the velocity data is increased based both on the immediatelyprevious swinging strength and the current swinging strength of thefirst unit. Still alternatively, as long as the first unit and thesecond unit are continuously swung alternately, the angle of curving isdetermined based on the sum or average of the swinging strength valuesof such a plurality of swings.

Referring to FIG. 29, in step S318, the swing operation of the secondunit is detected as in step S302.

In step S320, it is determined whether or not the second unit was swungbased on the detection result of the swing operation in step S318. Whenthe second unit was swung, the processing is advanced to step S322. Whenthe second unit was not swung, the processing is advanced to step S334.

In step S322, the operation history information 306 is updated.Specifically, the pre-update value of the “operation unit swungcurrently” is set as the “operation unit swung immediately previously”,and then the value representing the second unit is set as the “operationunit swung currently”.

In step S324, the swinging interval timer 308 is reset to 0.

In step S326, it is determined whether or not the swing operationdetected currently is “the first swing of the continuous swingoperation”. When the swing operation detected currently is “the firstswing of the continuous swing operation”, the processing is advanced tostep S334. Otherwise, the processing is advanced to step S328.

In step S328, it is determined whether or not the operation unit swungimmediately previously is the second unit, by referring to the operationhistory information 306. When the operation unit swung immediatelypreviously is the second unit (i.e., when the second unit iscontinuously swung), the processing is advanced to step S332. When theoperation unit swung immediately previously is not the second unit(i.e., when the operation unit swung immediately previously is the firstunit; namely, the first unit and the second unit are swung alternately),the processing is advanced to step S330.

In step S330, the velocity data is increased by a predetermined amount.In a modification, when the swing operation of the second unit isdetected in step S318, the swinging strength may also be detected as inthe second embodiment, so that the velocity data can be increased morelargely as the swinging strength is greater.

In step S332, the directional vector is changed so as to cause thecharacter to curve leftward. In this step also, as the swinging strengthis greater, the character may curve at a larger angle.

In step S334, “1” is added to the swinging interval timer 308.

In step S336, it is determined whether or not the swinging intervaltimer 308 exceeds 60. When the swinging interval timer 308 exceeds 60,the processing is advanced to step S338. When the swinging intervaltimer 308 does not exceed 60, the processing is advanced to step S340.

In step S338, the operation history information 306 is cleared.

In step S340, the current position data is updated based on the velocitydata and the directional vector. As a result, the character in the gameworld moves by the distance represented by the velocity data in thedirection represented by the directional vector.

In step S342, the game image displayed on the monitor 2 is updated basedon the current position data.

In step S344, the velocity data is decreased by a predetermined amount.Then, the processing is returned to step S302 in FIG. 28.

As described above, according to this embodiment, the player can freelymove both of his/her hands. Owing to a high degree of freedom of motionrealized by such an arrangement, a dynamic play is made possible. Inaddition, the player can control the character by swinging the operationunits. Therefore, the player can play intuitively and thus obtain a highoperability.

In this embodiment, three-axial acceleration sensors are used. As in thesecond embodiment, even when one-axial acceleration sensors are used,substantially the same effects as those of this embodiment can beprovided.

In this embodiment, it is detected whether the first unit iscontinuously swung, the second unit is continuously swung, or the firstunit and the second unit are alternately swung. Then, the game controlis performed in accordance with the detection result. In a modification,it may be detected whether or not the continuous swinging is of apredetermined pattern. For example, predetermined game processing (forexample, processing of allowing the character to make an attack) may beexecuted when a pattern of “the swing of the first unit→the swing of thesecond unit→the swing of the second unit→the swing of the first unit” isdetected. (The pattern is not limited to this, and any other appropriatepattern may be set.)

In this embodiment, when the interval between two continuous swingoperations is within a predetermined time period (for example, within a60 frame time period), it is determined that the first unit and thesecond unit are alternately swung. The present technology is not limitedto this. When a swing is made within a predetermined time period afterthe first swing, it may be determined that the same operation unit iscontinuously swung or two operation units are alternately swung.Alternatively, as the same operation unit is continuously swung for alonger time period, the interval for determining whether the swings aremade continuously or alternately may be extended (or shortened).

Fourth Embodiment

An image displayed in a fourth embodiment is, for example, substantiallythe same as the image shown in FIG. 19. In this embodiment, one of thefirst unit and the second unit is used as an inclination unit, and theother is used as a swing unit. The player can control the motion of thecharacter by inclining the inclination unit or by swinging the swingunit.

FIG. 31 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in the fourthembodiment. When the inclination unit is inclined rightward, thecharacter curves rightward; whereas when the inclination unit isinclined leftward, the character curves leftward. When the swing unit isswung, the character's motion is accelerated in the advancing directionat that time.

FIG. 32 shows an exemplary memory map of the main memory 33 in thefourth embodiment. The main memory 33 stores a game program 400, gameimage data 402, character control data 404, inclination unit designationdata 406, and swing unit designation data 408.

The game image data 402 and the character control data 404 aresubstantially the same as those in the first embodiment and will not bedescribed here.

The inclination unit designation data 406 is data representing which ofthe first unit and the second unit is to be used as the inclinationunit. The swing unit designation data 408 is data representing which ofthe first unit and the second unit is to be used as the swing unit.

With reference to the flowcharts in FIG. 33 through FIG. 35, a flow ofprocessing executed by the CPU 30 based on the game program 400 will bedescribed.

Referring to FIG. 33, when the execution of the game program 400 isstarted, in step S400, the CPU 30 first initializes various data usedfor the game processing (character control data 404, etc.), and stores“1” representing the first unit in the inclination unit designation data406 as an initial value and stores “2” representing the second unit inthe swing unit designation data 408 as an initial value. The CPU 30 alsogenerates and displays a game image including the character on thescreen of the monitor 2.

In step S402, it is determined whether or not the player has input aunit role exchange instruction using an operation button or the like.When a unit role exchange has been instructed, the processing isadvanced to step S404. When no unit role exchange has been instructed,the processing is advanced to step S406.

In step S404, the value of the inclination unit designation data 406 andthe value of the swing unit designation data 408 are exchanged.

Owing to the above-described processing, the player can optionallychange the role of the first unit and the role of the second unit inaccordance with his/her preference or the situation in the game. Such anexchange of the role of the first unit and the second is also applicableto the other embodiments in substantially the same manner.

In step S406, an inclination of the inclination unit is detected.Hereinafter, the detection of the inclination of the inclination unitwill be described in detail with reference to FIG. 34.

Referring to FIG. 34, in step S424, an output value (output vector) froman acceleration sensor provided in the inclination unit is obtained. Inthis embodiment, the output value in the X axis direction from theacceleration sensor is Ax, the output value in the Y axis direction fromthe acceleration sensor is Ay, and the output value in the Z axisdirection from the acceleration sensor is Az.

In step S426, it is determined whether or not the magnitude of theoutput vector (Ax, Ay, Az) from the acceleration sensor obtained in stepS424 is within the range of 0.8 to 1.2. When the magnitude of the outputvector from the acceleration sensor is within the range of 0.8 to 1.2,the processing is advanced to step S428. When the magnitude of theoutput vector from the acceleration sensor is not within the range of0.8 to 1.2, the processing is advanced to step S430.

In step S428, arctan (Az/Ay), which represents the inclination of theinclination unit around the Z axis (represented by angle θ in FIG. 36),is calculated, and the calculated value is returned as a return valuefor the detection of the inclination. Then, the processing is advancedto step S408 in FIG. 33.

In step S430, an error is returned as the detection result of theinclination. Thus, the detection of the inclination is terminated, andthe processing is advanced to step S408.

In step S408, it is determined whether or not the detection result ofthe inclination in step S430 is an error. When the result is an error,the processing is advanced to step S412. When the result is not anerror, the processing is advanced to step S410.

In step S410, the directional vector is changed in accordance with thereturn value θ of the detection result of the inclination in step S406.The directional vector can be changed by various methods. In thisembodiment, for example, the method shown in FIG. 37 is used. Thecurrent directional vector is rotated by the return value θ around therotation axis, which is the normal vector to the ground at the currentposition of the character. The resultant vector is determined as a newdirectional vector.

In step S412, a swing operation of the swing unit is detected.Hereinafter, the detection of the swing operation will be described indetail with reference to FIG. 35.

Referring to FIG. 35, in step S432, an output value (output vector) froman acceleration sensor provided in the swing unit is obtained. In thisembodiment, the output value in the X axis direction from theacceleration sensor is Ax, the output value in the Y axis direction fromthe acceleration sensor is Ay, and the output value in the Z axisdirection from the acceleration sensor is Az.

In step S434, it is determined whether or not the magnitude of theoutput vector (Ax, Ay, Az) from the acceleration sensor obtained in stepS432 is larger than K (K is a predetermined value). When the magnitudeof the output vector from the acceleration sensor is larger than K, theprocessing is advanced to step S436. When the magnitude of the outputvector from the acceleration sensor is not larger than K, the processingis advanced to step S438.

In step S436, a value representing that “a swing operation wasperformed” is returned as the detection result of the swing operation.Then, the processing is advanced to step S414 in FIG. 33.

In step S438, a value representing “no swing operation” is returned asthe detection result of the swing operation. Then, the processing isadvanced to S414 in FIG. 33.

In step S414, it is determined whether or not the swing unit was swungbased on the detection result of the swing operation in step S412. Whenthe swing unit was swung, the processing is advanced to step S416. Whenthe swing unit was not swung, the processing is advanced to step S418.

In step S416, the velocity data is increased by a predetermined amount.In a modification, the following processing may be executed. When theswing operation of the swing unit is detected in step S412, the swingingstrength is also detected as in the second embodiment. The velocity datais increased more largely as the swinging strength is greater.

In step S418, the current position data is updated based on the velocitydata and the directional vector. As a result, the character in the gameworld moves by the distance represented by the velocity data in thedirection represented by the directional vector.

In step S420, the game image displayed on the monitor 2 is updated basedon the current position data.

In step S422, the velocity data is decreased by a predetermined amount.Then, the processing is returned to step S402.

As described above, according to this embodiment, the player can freelymove both of his/her hands. Owing to a high degree of freedom of motionrealized by such an arrangement, a dynamic play is made possible. Inaddition, the character can curve by inclining the inclination unit andaccelerated by swinging the swing unit. Therefore, the player can playintuitively and thus obtain a high operability.

In this embodiment, three-axial acceleration sensors are used. As in thefirst and second embodiments, even when one-axial acceleration sensorsare used, substantially the same effects as those of this embodiment canbe provided.

As described later, when the swing unit is swung, the swinging directionmay be detected, so that the direction or the magnitude of accelerationof the character can be changed in accordance with the detecteddirection.

Fifth Embodiment

An image displayed in a fifth embodiment is, for example, substantiallythe same as the image shown in FIG. 19. In this embodiment, the motionof the character is controlled based on the direction in which the firstunit and the second unit are swung (moved).

FIG. 38 shows an exemplary correspondence between the operationperformed by the player and the motion of the character in the fifthembodiment. When either the first unit or the second unit is swungobliquely rightward and farther from the player (right-forward;“forward” is the direction in which the player is directed), thecharacter is accelerated slightly right-forward; whereas when either thefirst unit or the second unit is swung obliquely leftward and closer tothe player (left-rearward; “rearward” is the direction opposite to thedirection in which the player is directed), the character is acceleratedslightly left-rearward. In this embodiment, the character is basicallyaccelerated in a direction (direction based on the forward directionwith respect to the character in the virtual space) corresponding to thedirection in which the operation unit is swung (direction based on theforward direction with respect to the player in the real world).

When the first unit and the second unit are simultaneously swungobliquely rightward and farther from the player, the character isaccelerated largely right-forward. In this embodiment, when the firstunit and the second unit are simultaneously swung in the same direction,the character is accelerated largely.

When one of the first unit and the second unit is swung rightward andthe other unit is swung farther from the player, the character isaccelerated slightly right-forward. In this embodiment, when the firstunit and the second unit are simultaneously swung in differentdirections, the acceleration direction of the character is determinedbased on a direction obtained by synthesizing the swinging direction ofthe first unit and the swinging direction of the second unit.

When the first unit and the second unit are swung simultaneously inopposite directions, the character stops.

FIG. 39 shows an exemplary memory map of the main memory 33 in the fifthembodiment. The main memory 33 stores a game program 500, game imagedata 502, character control data 504, a first swinging directionalvector 506, a second swinging directional vector 508, a first input flag510, a second input flag 512, a simultaneous input flag 514, a firsttimer 516, a second timer 518, a simultaneous input timer 520, firstsampling data 522, and second sampling data 524.

The game image data 502 is substantially the same as that described inthe first embodiment and will not be described here.

The character control data 504 includes current position data, velocityvector representing the magnitude and the direction of the moving speedof the character, and a posture matrix representing the posture of thecharacter. The current position data is represented by athree-dimensional coordinate value, and the velocity vector isrepresented by a three-dimensional vector. The posture matrix is a setof a forward vector which is a three-dimensional unit vectorrepresenting the forward direction with respect to the character, arightward vector which is a three-dimensional unit vector representingthe rightward direction with respect to the character, and an upwardvector which is a three-dimensional unit vector representing the upwarddirection with respect to the character.

The first swinging directional vector 506 represents a direction inwhich the first unit is swung by the player. The second swingingdirectional vector 508 represents a direction in which the second unitis swung by the player.

The first input flag 510, the second input flag 512, the simultaneousinput flag 514, the first timer 516, the second timer 518, and thesimultaneous input timer 520 are substantially the same as those in thesecond embodiment and will not be described here.

The first sampling data 522 is sampling data on outputs from the firstacceleration sensor provided in the first unit for the immediatelyprevious 60 frames. The second sampling data 524 is sampling data onoutputs from the second acceleration sensor provided in the second unitfor the immediately previous 60 frames.

With reference to the flowcharts in FIG. 40 through FIG. 44, a flow ofprocessing executed by the CPU 30 based on the game program 500 will bedescribed.

Referring to FIG. 40, when the execution of the game program 500 isstarted, in step S500, the CPU 30 first initializes various data usedfor the game processing (character control data 504, first swingingdirectional vector 506, first input flag 510, first timer 516, firstsampling data 522, etc.), and generates and displays a game imageincluding the character on the screen of the monitor 2.

In step S502, an output value from the first acceleration sensor and anoutput value from the second acceleration sensor are obtained, and thusthe first sampling data 522 and the second sampling data 524 areupdated.

In step S504, it is determined whether or not the simultaneous inputflag 514 is on. When the simultaneous input flag 514 is on, theprocessing is advanced to step S506. When the simultaneous input flag514 is not on, the processing is advanced to step S512.

In step S506, “1” is added to the simultaneous input timer 520.

In step S508, it is determined whether or not the simultaneous inputtimer 520 is equal to or greater than 20. When the simultaneous inputtimer 520 is equal to or greater than 20, the processing is advanced tostep S510. Otherwise, the processing is advanced to step S596 in FIG.43.

In step S510, the simultaneous input flag 514 is turned off, and theprocessing is advanced to step S596 in FIG. 43.

In step S512, it is determined whether or not the first input flag 510is on. When the first input flag 510 is on, the processing is advancedto step S514. When the first input flag 510 is not on, the processing isadvanced to step S526.

In step S514, “1” is added to the first timer 516.

In step S516, it is determined whether or not the first timer 516 is 5.When the first timer 516 is 5 (i.e., when only the first unit wasswung), the processing is advanced to step S518. When the first timer516 is not 5, the processing is advanced to step S522.

In step S518, the velocity vector is changed based on the first swingingdirectional vector 506 detected in the step of detecting the swingingdirection of the first unit (step S542 described later). The velocityvector can be changed by various methods. In this embodiment, forexample, the method shown in FIG. 45 is used. Where an X axis value ofthe first swinging directional vector 506 is a1 and a Z axis valuethereof is b1, the current vector is synthesized with a vectorrepresented by (rightward vector×a1+forward vector×b1). The resultantvector is determined as a new velocity vector. Therefore, as the X axisvalue of the first swinging directional vector 506 is larger, thecharacter is accelerated in the direction of the rightward vector morelargely. As the Z axis value of the first swinging directional vector506 is larger, the character is accelerated in the direction of theforward vector more largely.

In step S520, the posture matrix is updated such that the direction ofthe forward vector matches the direction of the velocity vector updatedin step S518.

In step S522, it is determined whether or not the first timer 516 islarger than 10. When the first timer 516 is larger than 10, theprocessing is advanced to step S524. When the first timer 516 is notlarger than 10, the processing is advanced to step S526.

In step S524, the first input flag 510 is turned off.

In step S526, it is determined whether or not the second input flag 512is on. When the second input flag 512 is on, the processing is advancedto step S528. When the second input flag 512 is not on, the processingis advanced to step S540 in FIG. 41.

In step S528, “1” is added to the second input timer 518.

In step S530, it is determined whether or not the second timer 518 is 5.When the second timer 518 is 5 (i.e., when only the second unit wasswung), the processing is advanced to step S532. When the second timer518 is not 5, the processing is advanced to step S536.

In step S532, the velocity vector is changed based on the secondswinging directional vector 508 detected in the step of detecting theswinging direction of the second unit (step S570 described later), bysubstantially the same method as in step S518.

In step S534, the posture matrix is updated such that the direction ofthe forward vector matches the direction of the velocity vector updatedin step S532.

In step S536, it is determined whether or not the second timer 518 islarger than 10. When the second timer 518 is larger than 10, theprocessing is advanced to step S538. When the second timer 518 is notlarger than 10, the processing is advanced to step S540 in FIG. 41.

In step S538, the second input flag 512 is turned off.

Referring to FIG. 41, in step S540, it is determined whether or not thefirst input flag 510 is on. When the first input flag 510 is on, theprocessing is advanced to step S568. When the first input flag 510 isnot on, the processing is advanced to step S542.

In step S542, the swinging direction of the first unit is detected.Hereinafter, the detection of the swinging direction of the first unitwill be described in detail with reference to FIG. 44.

Referring to FIG. 44, in step S604, the first sampling data 522 isreferred to. It is determined whether or not the magnitude of the vectorrepresented by the X axis value and the Z axis value of the secondnewest detected value from the first acceleration sensor (Ax, Ay, Az)(the magnitude is √(Ax²+Az²) is larger than L (L is a predeterminedvalue). (Hereinafter, such a vector represented by an X axis value and aZ axis value will be referred to as an “XZ vector”.) When the magnitudeof the XZ vector is larger than L (i.e., when the first unit isdetermined to have been swung), the processing is advanced to step S606.When the magnitude of the XZ vector is not larger than L (i.e., when thefirst unit is determined not to have been swung), the processing isadvanced to step S610.

In step S606, the first sampling data 522 is referred to. It isdetermined whether or not the magnitude of the XZ vector of the secondnewest detected value from the first acceleration sensor is larger thanthe magnitude of the XZ vector of the newest detected value from thefirst acceleration sensor. This is performed in order to detect thetiming at which the maximum force was applied to the first accelerationsensor in a direction parallel to the XZ plane. When the player swingsthe first unit in a direction parallel to the XZ plane, a large force isapplied to the first unit (first acceleration sensor) by the playerimmediately after the start of the swing and immediately before the endof the swing. Therefore, the magnitude of the XZ vector of the detectedvalue regarding the first acceleration sensor is maximum immediatelyafter the start of the swing and immediately before the end of theswing. When the magnitude of the XZ vector of the second newest detectedvalue from the first acceleration sensor is larger than the magnitude ofthe XZ vector of the newest detected value from the first accelerationsensor (i.e., immediately after the magnitude of the XZ vector of thedetected value regarding the first acceleration sensor is maximized),the processing is advanced to step S608. Otherwise, the processing isadvanced to step S610.

In step S608, the XZ vector (Ax, Az) of the second newest detected valuefrom the first acceleration sensor is returned as a return value for thedetection of the swinging direction. The XZ vector (Ax, Az) representsthe direction in which the force was applied to the first unit when theplayer swung the first unit (i.e., the direction in which the first unitwas swung). Then, the processing is advanced to step S544 in FIG. 41.

Alternatively, the swinging direction may be detected by averaging theXZ vectors during the time period in which the XZ vector is larger thanL.

The XZ vector detected by the direction of the swinging direction may besometimes opposite to the actual swinging direction of the operationunit when a certain detection method is used. In such a case, a valueobtained by multiplying the detected XZ vector by −1 may be returned asa return value for the detection of the swinging direction.

In step S610, a value representing “no swing operation” is returned asthe detection result of the swing direction. Then, the processing isadvanced to step S544 in FIG. 41.

In step S544, it is determined whether or not the first unit was swungbased on the detection result of the swing direction in step S542. Whenthe first unit was swung, the processing is advanced to step S546. Whenthe first unit was not swung, the processing is advanced to step S568.

In step S546, the return value for the direction of the swingingdirection in step S542 (i.e., a vector representing the swingingdirection of the first unit) is set as the first swinging directionalvector 506.

In step S548, it is determined whether or not the second input flag 512is on and also whether or not the second timer 518 is equal or smallerthan 4. When the second input flag 512 is on and also the second timer518 is equal or smaller than 4 (i.e., when the first unit and the secondunit were swung substantially simultaneously), the processing isadvanced to step S550. When the second input flag 512 is not on, or thesecond timer 518 is larger than 4, the processing is advanced to stepS566.

In step S550, it is determined whether or not an angle made by the firstswinging directional vector 506 and the second swinging directionalvector 508 (a vector representing the swinging direction of the secondunit) which is set in step S574 described later is within the range of−30° to 30°. When the angle made by the first swinging directionalvector 506 and the second swinging directional vector 508 is within therange of −30° to 30° (i.e., when the first unit and the second unit wereswung in substantially the same direction), the processing is advancedto step S552. When the angle made by the first swinging directionalvector 506 and the second swinging directional vector 508 is not withinthe range of −30° to 30°, the processing is advanced to step S558. Therange of −30° to 30° is merely exemplary, and the range may be wider ornarrower. Any range by which the first unit and the second unit areregarded as being swung in substantially the same direction is usable.

In step S552, the velocity vector is changed based on the first swingingdirectional vector 506 and the second swinging directional vector 508.The velocity vector can be changed by various methods. In thisembodiment, for example, the method shown in FIG. 46 is used. The firstswinging directional vector 506 and the second swinging directionalvector 508 are synthesized to obtain a synthesized swinging directionalvector. Where an X axis value of the synthesized swinging directionalvector is a3 and a Z axis value thereof is b3, the current vector and avector represented by (rightward vector×a3+forward vector×b3)×α(predetermined constant) are synthesized. The resultant vector isdetermined as a new velocity vector. α is a constant, and in step S552,α=2. Namely, in step S552, the new velocity vector is determined bysynthesizing the current vector with a vector obtained by doubling themagnitude of the synthesized swinging directional vector. In step S552,a vector obtained by doubling the magnitude of the first swingingdirectional vector 506 or the second swinging directional vector 508 maybe regarded as the synthesized vector.

In step S554, the posture matrix is updated such that the direction ofthe forward vector matches the direction of the velocity vector updatedin step S552.

In step S556, the simultaneous input flag 514 is turned on. Thesimultaneous input timer 520 is reset to 0. The second input flag 512 isturned off. In step S558, it is determined whether or not an angle madeby the first swinging directional vector 506 and the second swingingdirectional vector 508 is either within the range of 150° to 180° orwithin the range of −150° to −180°. When the angle made by the firstswinging directional vector 506 and the second swinging directionalvector 508 is either within the range of 150° to 180° or within therange of −150° to −180° (i.e., when the first unit and the second unitwere swung in substantially the opposite directions), the processing isadvanced to step S560. When the angle made by the first swingingdirectional vector 506 and the second swinging directional vector 508 isneither within the range of 150° to 180° nor within the range of −150°to −180°, the processing is advanced to step S562. The ranges of 150° to180° and −150° to −180° are merely exemplary, and the ranges may bewider or narrower. Any ranges by which the first unit and the secondunit are regarded as being swung in substantially the oppositedirections are usable.

In step S560, the velocity vector is changed to 0, and the processing isadvanced to step S556.

In step S562, as in step S552, the first swinging directional vector 506and the second swinging directional vector 508 are synthesized to obtaina synthesized swinging directional vector. Where an X axis value of thesynthesized swinging directional vector is a3 and a Z axis value thereofis b3, the current vector and a vector represented by (rightwardvector×a3+forward vector×b3)×α (predetermined constant) are synthesized.The resultant vector is determined as a new velocity vector. In stepS562, α=1.5. Namely, in step S562, the new velocity vector is determinedby synthesizing the current vector with a vector obtained by multiplyingthe magnitude of the synthesized swinging directional vector by 1.5.

In step S564, the posture matrix is updated such that the direction ofthe forward vector matches the direction of the velocity vector updatedin step S562.

In step S566, the first input flag 510 is turned on. The first inputtimer 516 is reset to 0.

Referring to FIG. 42, in step S568, it is determined whether or not thesecond input flag 512 is on. When the second input flag 512 is on, theprocessing is advanced to step S596 in FIG. 43. When the second inputflag 512 is not on, the processing is advanced to step S570.

In step S570, the swinging direction of the second unit is detected.Hereinafter, the detection of the swinging direction of the second unitwill be described in detail with reference to FIG. 44.

Referring to FIG. 44, in step S604, the second sampling data 524 isreferred to. It is determined whether or not the magnitude of the XZvector of the second newest detected value from the second accelerationsensor is larger than L. When the magnitude of the XZ vector is largerthan L (i.e., when the second unit is determined to have been swung),the processing is advanced to step S606. When the magnitude of the XZvector is not larger than L (i.e., when the second unit is determinednot to have been swung), the processing is advanced to step S610.

In step S606, the second sampling data 524 is referred to. It isdetermined whether or not the magnitude of the XZ vector of the secondnewest detected value from the second acceleration sensor is larger thanthe magnitude of the XZ vector of the newest detected value from thesecond acceleration sensor. When the magnitude of the XZ vector of thesecond newest detected value from the second acceleration sensor islarger than the magnitude of the XZ vector of the newest detected valuefrom the second acceleration sensor (i.e., immediately after themagnitude of the XZ vector of the detected value regarding the secondacceleration sensor is maximized), the processing is advanced to stepS608. Otherwise, the processing is advanced to step S610.

In step S608, the XZ vector (Ax, Az) of the second newest detected valuefrom the second acceleration sensor is returned as a return value forthe detection of the swinging direction. The XZ vector (Ax, Az)represents the direction in which the force was applied to the secondunit when the player swung the second unit (i.e., the direction in whichthe second unit was swung). Then, the processing is advanced to stepS572 in FIG. 42.

In step S610, a value representing “no swing operation” is returned asthe detection result of the swing direction. Then, the processing isadvanced to step S572 in FIG. 42.

In step S572, it is determined whether or not the second unit was swungbased on the detection result of the swing direction in step S570. Whenthe second unit was swung, the processing is advanced to step S574. Whenthe second unit was not swung, the processing is advanced to step S596.

In step S574, the return value for the direction of the swingingdirection in step S570 (i.e., a vector representing the swingingdirection of the second unit) is set as the second swinging directionalvector 508.

In step S576, it is determined whether or not the first input flag 510is on and also whether or not the first timer 516 is equal or smallerthan 4. When the first input flag 510 is on and also the first timer 516is equal or smaller than 4 (i.e., when the first unit and the secondunit were swung substantially simultaneously), the processing isadvanced to step S578. When the first input flag 510 is not on, or thefirst timer 516 is larger than 4, the processing is advanced to stepS594.

In step S578, it is determined whether or not an angle made by the firstswinging directional vector 506 and the second swinging directionalvector 508 is within the range of −30° to 30°. When the angle made bythe first swinging directional vector 506 and the second swingingdirectional vector 508 is within the range of −30° to 30° (i.e., whenthe first unit and the second unit were swung in substantially the samedirection), the processing is advanced to step S580. When the angle madeby the first swinging directional vector 506 and the second swingingdirectional vector 508 is not within the range of −30° to 30°, theprocessing is advanced to step S586.

In step S580, as in step S552, a new velocity vector is determined bysynthesizing the current vector and a vector obtained by doubling themagnitude of the synthesized swinging directional vector.

In step S582, the posture matrix is updated such that the direction ofthe forward vector matches the direction of the velocity vector updatedin step S580.

In step S584, the simultaneous input flag 514 is turned on. Thesimultaneous input timer 520 is reset to 0. The first input flag 510 isturned off.

In step S586, it is determined whether or not an angle made by the firstswinging directional vector 506 and the second swinging directionalvector 508 is within the range of 150° to 180° or within the range of−150° to −180°. When the angle made by the first swinging directionalvector 506 and the second swinging directional vector 508 is within therange of 150° to 180° or within the range of −150° to −180° (i.e., whenthe first unit and the second unit were swung in substantially theopposite directions), the processing is advanced to step S588. When theangle made by the first swinging directional vector 506 and the secondswinging directional vector 508 is neither within the range of 150° to180° nor within the range of −150° to −180°, the processing is advancedto step S590.

In step S588, the velocity vector is changed to 0, and the processing isadvanced to step S584.

In step S590, as in step S562, a new velocity vector is determined bysynthesizing the current vector and a vector obtained by multiplying themagnitude of the synthesized swinging directional vector by 1.5.

In step S592, the posture matrix is updated such that the direction ofthe forward vector matches the direction of the velocity vector updatedin step S590.

In step S594, the second input flag 512 is turned on. The second inputtimer 518 is reset to 0.

Referring to FIG. 43, in step S596, the current position data is updatedbased on the velocity vector.

In step S598, the game image displayed on the monitor 2 is updated basedon the current position data and the posture matrix.

In step S600, the posture matrix and the velocity vector are updated soas to reflect the influence of the topography. This is performed suchthat, for example, when the character goes up a steep slope, thecharacter inclines its body slightly backward and the advancingdirection of the character is along the slope.

In step S602, the velocity data is decreased by a predetermined amount.Then, the processing is returned to step S502 in FIG. 40.

The above-described processing is repeated, so that the game image ischanged when necessary in accordance with the operation performed by theplayer.

The processing in this embodiment can be summarized as follows.

(1) When the first unit and the second unit are swung at differenttimings→the velocity vector is updated based on the directional vectorsof the respective units.

(2) When the first unit and the second unit are swung substantiallysimultaneously in substantially the same direction→the velocity vectoris updated based on a vector obtained by doubling the magnitude of thesynthesized swinging directional vector.

(3) When the first unit and the second unit are swung substantiallysimultaneously in different directions (excluding substantially theopposite directions)→the velocity vector is updated based on a vectorobtained by multiplying the magnitude of the synthesized swingingdirectional vector by 1.5.

(4) When the first unit and the second unit are swung substantiallysimultaneously in substantially opposite directions→the velocity vectoris made 0 (the character stops).

In this manner, the game processing is made in different manners basedon the swinging timing and the relative directions of the first unit andthe second unit. This allows the player to make various inputs.

As described above, according to this embodiment, the player can freelymove both of his/her hands. Owing to a high degree of freedom of motionrealized by such an arrangement, a dynamic play is made possible. Sincethe player can control the character by swinging the operation units,the player can play intuitively and thus obtain a high operability. Asthe swing directions of two operation units swung simultaneously arecloser to each other, the acceleration of the character is larger.Therefore, a more intuitive operation is realized.

In this embodiment, three-axial acceleration sensors are used. Even whentwo-axial acceleration sensors are used, the swinging directions of theoperation units can be detected (for example, in the flow shown in FIG.44, it is detected that the operation units were swung, and the swingingdirections thereof are also detected, by referring to the output valuesin the two axes of the X axis and the Z axis). Thus, substantially thesame effects as those of this embodiment are provided.

In this embodiment, one of the first unit and the second unit is swung,the character is accelerated in accordance with the swinging directionthereof. Alternatively, the game may be set such that when one of thefirst unit and the second unit is swung, the character is notaccelerated; whereas when the first unit and the second unit aresubstantially simultaneously swung, the character is accelerated.

In this embodiment, when it is detected that the output from theacceleration sensor (specifically the XZ vector in this embodiment) ismaximized, the swinging direction of the operation unit is detectedbased on the output from the acceleration sensor at that time or thevicinity thereof. The present invention is not limited to this. Theswinging direction of the operation unit may be detected by any othermethod. For example, the following methods are usable. When themagnitude of the XZ vector from the acceleration sensor exceeds apredetermined value and then returns to 0, the sampling data during thattime period is referred to, and thus the maximum value of the XZ vectorfrom the acceleration sensor during that period may be set as theswinging directional vector. A vector obtained by averaging orsynthesizing the XZ vectors during that period may be set as theswinging directional vector. Alternatively, the outputs from theacceleration sensor are integrated to calculate the moving speed of theoperation unit. The swinging direction of the operation unit may bedetected based on the outputs from the acceleration sensor during thetime period in which the moving speed calculated in this manner is equalto or larger than a predetermined value.

In this embodiment, the swing operation is detected. The presentinvention is not limited to this. A motion of the operation unit may bedetected, in which case the game control may be executed based on thedirection and the timing of the motion.

Sixth Embodiment

An image displayed in a sixth embodiment is, for example, substantiallythe same as the image shown in FIG. 19. In this embodiment, the motionof the character is controlled based on the direction in which the firstunit and the second unit are swung.

FIG. 47 shows an exemplary manner of operating the operation units inthe sixth embodiment. In this embodiment, the player instructs adirection by performing a direction instruction operation (an operationof moving the operation unit horizontally), and then determines thedirection which was input by the direction instruction operation byperforming a trigger operation (an operation of moving the operationunit vertically downward). The correspondence between the direction inwhich the first unit and the second unit are moved by the directioninstruction operation and the motion of the character is substantiallythe same as that shown in FIG. 38 except for several points.Hereinafter, a swing operation is used as an example of the operationfor moving the operation units. The present invention is not limited tothis, and any operation is usable as long as the motions of theoperation units are detected and the motion of the character iscontrolled based on the direction and the magnitude of the detectedmotions.

FIG. 48 shows an exemplary memory map of the main memory 33 in the sixthembodiment. The main memory 33 stores a game program 703, game imagedata 704, character control data 705, a first swinging directionalvector 709, a second swinging directional vector 710, a first input flag711, a second input flag 712, a simultaneous input flag 714, a firsttimer 716, a second timer 718, a simultaneous input timer 720, firstsampling data 722, second sampling data 724, a first trigger operationstrength value 726, and a second trigger operation strength value 728.

The game image data 704, the character control data 705, the firstswinging directional vector 709, the second swinging directional vector710, the first input flag 711, the second input flag 712, thesimultaneous input flag 714, the first timer 716, the second timer 718,the simultaneous input timer 720, first sampling data 722, and secondsampling data 724 are substantially the same as those in the fifthembodiment and will not be described here.

The first trigger operation strength value 726 represents a swingingstrength when a trigger operation is made on the first unit. The secondtrigger operation strength value 728 represents a swinging strength whena trigger operation is made on the second unit.

With reference to the flowcharts in FIG. 49 through FIG. 53, a flow ofprocessing executed by the CPU 30 based on the game program 703 will bedescribed.

Referring to FIG. 49, the processing in steps S700, S702, S704, S706,S708, S710, S712, S714 and S716 is substantially the same as thatdescribed in the fifth embodiment and will not be described here.

In step S718, the velocity vector is changed based on the first swingingdirectional vector 709 which is calculated in step S748 described laterbased on the first sampling data 722 (i.e., a vector representing thedirection in which the first unit was swung by the player for making adirection instruction operation) and the first trigger operationstrength value 726 which is set in accordance with the detection resultof the swinging strength of the first unit obtained in step S742described later (i.e., a vector representing the strength at which thefirst unit was swung by the player for making a trigger operation). Thevelocity vector can be changed by various methods. In this embodiment,for example, the method shown in FIG. 54 is used. Where an X axis valueof the first swinging directional vector 709 is a1, a Z axis valuethereof is b1, and the first trigger operation strength value 726 is β1,the current vector is synthesized with a vector represented by(rightward vector×a1+forward vector×b1)×β. The resultant vector isdetermined as a new velocity vector. Therefore, as the first triggeroperation strength value 726 is larger, the character is acceleratedmore largely.

The processing in steps S720, S722, S724, S726, S728 and S730 issubstantially the same as that described in the fifth embodiment andwill not be described here.

In step S732, the velocity vector is changed based on the secondswinging directional vector 710 which is calculated in step S782described later based on the second sampling data 724 (i.e., a vectorrepresenting the direction in which the second unit was swung by theplayer for making a direction instruction operation) and the secondtrigger operation strength value 728 which is set in accordance with thedetection result of the swinging strength of the second unit obtained instep S776 described later (i.e., a vector representing the strength atwhich the second unit was swung by the player for making a triggeroperation). The velocity vector is changed as follows, for example.Where an X axis value of the second swinging directional vector 710 isa2, a Z axis value thereof is b2, and the second trigger operationstrength value 728 is β2, the current vector is synthesized with avector represented by (rightward vector×a2+forward vector×b2)×β. Theresultant vector is determined as a new velocity vector. Therefore, asthe second trigger operation strength value 728 is larger, the characteris accelerated more largely.

The processing in steps S734, S736, S738 and S740 (FIG. 50) issubstantially the same as that described in the fifth embodiment andwill not be described here.

Referring to FIG. 50, in step S742, the trigger operation strength ofthe first unit is detected. Hereinafter, the detection of the triggeroperation strength of the first unit will be described in detail withreference to FIG. 53.

Referring to FIG. 53, in step S816, the first sampling data 722 isreferred to. It is determined whether or not the magnitude of a Y axisvalue Ay of the second newest detected value from the first accelerationsensor (Ax, Ay, Az) is larger than M (M is a predetermined value and islarger than 1). When the magnitude of the Y axis value Ay of the secondnewest detected value from the first acceleration sensor is larger thanM (i.e., when a trigger operation is determined to have been made on thefirst unit), the processing is advanced to step S818. When the magnitudeof the Y axis value Ay of the second newest detected value from thefirst acceleration sensor is not larger than M (i.e., when no triggeroperation is determined to have been made on the first unit), theprocessing is advanced to step S822.

In step S818, the first sampling data 722 is referred to. It isdetermined whether or not the magnitude of the Y axis value of thesecond newest detected value from the first acceleration sensor islarger than the magnitude of the Y axis value of the newest detectedvalue from the first acceleration sensor. This is performed in order todetect the timing at which the maximum force was applied to the firstacceleration sensor in a direction of the Y axis. When the player swingsthe first unit in a direction of the Y axis, as shown in FIG. 54, the Yaxis value of the detected value regarding the first acceleration sensoris minimum immediately after the start of the swing and maximumimmediately before the end of the swing. Therefore, the determinationresult in step S818 is positive at time T1 in FIG. 56. When themagnitude of the Y axis value of the second newest detected value fromthe first acceleration sensor is larger than the magnitude of the Y axisvalue of the newest detected value from the first acceleration sensor(i.e., immediately after the magnitude of the Y axis value of thedetected value regarding the first acceleration sensor is maximized),the processing is advanced to step S820. Otherwise, the processing isadvanced to step S822.

In step S820, the Y axis value Ay of the second newest detected valuefrom the first acceleration sensor is returned as a return value for thedetection of the trigging operation strength. The Y axis value Ayrepresents the magnitude of the force applied to the first unit when theplayer made a trigger operation on the first unit (i.e., the strength atwhich the first unit was swung). Then, the processing is advanced tostep S744 in FIG. 50.

In step S822, a value representing “no trigger operation” is returned asthe detection result of the trigger operation strength. Then, theprocessing is advanced to step S744 in FIG. 50.

In step S744, it is determined whether or not a trigger operation wasmade on the first unit based on the detection result of the triggeroperation strength in step S742. When a trigger operation was made onthe first unit, the processing is advanced to step S746. When no triggeroperation was made on the first unit, the processing is advanced to stepS774.

In step S746, a return value for the first trigger operation strengthvalue (i.e., a value representing the strength at which the first unitwas swung by the trigger operation made thereon) is set.

In step S748, a direction in which the first unit was swung for making adirection instruction operation is calculated based on the firstsampling data 722, and the calculation result is set as the firstswinging directional vector 709. Such a direction can be detected byvarious methods. FIG. 56 shows a change in the output value from theacceleration sensor in the X axis direction and the Z axis directionwhen the player swings the operation unit left-forward for making adirection instruction operation.

In this embodiment, the direction in which the operation unit was swungis detected by, for example, referring to the sampling data for theimmediately previous 60 frames when a trigger operation is detected (T1in FIG. 56). Specifically, the sampling data is referred to, to detectthe time at which the signs of the X axis value and the Z axis value areinverted (T2 in FIG. 56). The XZ vectors represented by the X axisvalues and the Z axis values in the frames after time T2 are averaged.Thus, the direction in which the operation unit was swung is detected.In the example of FIG. 56, the average of the X axis values after timeT2 is negative (which means that the operation unit was swung in thenegative X axis direction), and the average of the Z axis values aftertime T2 is positive (which means that the operation unit was swung inthe positive Z axis direction). The absolute values of these averagesare substantially equal to each other. Therefore, it is found that theoperation unit was swung in a direction which is 45° offset from theforward direction with respect to the player. In the case where thesampling data for the immediately previous 60 frames is not sufficientto detect time T2, the sampling data may be stored for a longer timeperiod. However, even when the sampling data is stored for asufficiently long time period, if no Ax or Az output representing adirection instruction operation is obtained for a predetermined timeperiod (tolerable time period) before the time point when the triggeroperation was detected (T1) (for example, when there is no outputchanging as shown in FIG. 56, or when the output value of Ax or Ay issimply 0), it can be determined that the direction instruction operationand the trigger operation are not continuously performed. In this case,it is preferable to make such operations invalid. The start of the swingoperation, the end of the swing operation, or a time point in the middleof the swing operation may be the reference point of the tolerable timeperiod, instead of the time point when the trigger operation wasdetected.

According to another method for detecting the direction in which theoperation unit was swung for making a direction instruction operation,an average value of each of the X axis values and the Z axis values fromthe start of the swing operation until time T2 at which the signs areinverted in FIG. 56 may be obtained. In this case, the directionrepresented by the finally obtained XZ vector is opposite to the movingdirection of the operation unit which was swung.

According to still another method for detecting the direction in whichthe operation unit was swung for making the direction instructionoperation, the X axis value or the Z axis value from the accelerationsensor are not used as they are. A differential vector of the XZ vectorfrom the acceleration sensor between the frames (the direction of thedifferential vector represents the moving direction of the operationunit) is calculated. The direction represented by a differential vectorhaving the maximum magnitude may be determined as the direction in whichthe operation unit was swung for making the direction instructionoperation.

When the operation unit is swung, as shown in FIG. 56, the value of eachaxis is changed from 0→positive value→0→negative value→0 or 0→negativevalue→0→positive value→0. Therefore, in the case where such a pattern isfound during the immediately previous 60 frames based on the samplingdata, it can be recognized that the direction instruction operation wasperformed before the trigger operation. Thus, the direction in which theoperation unit was swung at the time of the direction instructionoperation is detected. In this manner, more accurate detection is madepossible.

In a modification to the processing in step S748, the followingprocessing may be executed. When the direction in which the first unitwas swung for making the direction instruction operation is detected, itis also determined based on the second sampling data 724 whether or notthe second unit was also swung at the time of the direction instructionoperation. When the second unit was also swung, the setting of the firstswinging directional vector 709 is cancelled. In this case, a newoperation requirement that “the first unit and the second unit shouldnot be swung simultaneously at the time of a direction instructionoperation” is imposed on the player.

In step S750, it is determined whether or not the magnitude of the firstswinging directional vector 709 which was set in step S748 is largerthan a predetermined value. When the magnitude of the first swingingdirectional vector 709 is larger than the predetermined value, theprocessing is advanced to step S752. Otherwise, the processing isadvanced to step S774 in FIG. 51.

In step S752, it is determined whether or not the direction of the firstswinging directional vector 709 is either within the range of 0° to 90°or within the range of −90° to 0°. Where an X axis value of the firstswinging directional vector 709 is Ax and a Z axis value thereof is Az,the direction of the first swinging directional vector 709 isrepresented by arctan (Ax/Az). When the first swinging directionalvector 709 is either within the range of 0° to 90° or within the rangeof −90° to 0°, the processing is advanced to step S754. When the firstswinging directional vector 709 is neither within the range of 0° to 90°nor within the range of −90° to 0°, the processing is advanced to stepS774 in FIG. 51. Owing to such an arrangement, the range of directionsin which the player can instruct by a direction instruction operationmade on the first unit can be limit to the range of 0° to 90° (i.e.,between the positive X axis direction and the positive Z axis direction)or the range of −90° to 0° (i.e., between the positive X axis directionand the negative Z axis direction). Namely, where the player holds thefirst unit with his/her right hand and holds the second unit withhis/her left hand, the range in which the first unit is swung can belimited to a right area. As described later, the range in which thesecond unit is swung is limited to a left area. In this manner, thefirst unit and the second unit are assigned different roles, so that thefirst unit and the second unit are prevented from colliding against eachother.

The processing in step S754 and S756 are the same as that described inthe fifth embodiment and will not be described here.

In step S758, the velocity vector is changed based on the first swingingdirectional vector 709, the second swinging directional vector 710, thefirst trigger operation strength value 726, and the second triggeroperation strength value 728. Specifically, as shown in FIG. 57, thefirst swinging directional vector 709 and the second swingingdirectional vector 710 are synthesized to obtain a synthesized swingingdirectional vector. Where the X axis value of the synthesized swingingdirectional vector is a3 and the Z axis value thereof is b3, the currentvector is synthesized with a vector represented by (rightwardvector×a3+forward vector×b3)×α (predetermined constant)×β(predeterminedconstant). The resultant vector is determined as a new velocity vector.α is a constant, and in step S758, α=2. β is a value in proportion tothe sum of the first trigger operation strength value 726 and the secondtrigger operation strength value 728. Therefore, as the sum of the firsttrigger operation strength value 726 and the second trigger operationstrength value 728 is larger, the acceleration of the character islarger.

In step S758, a vector obtained by doubling the first swingingdirectional vector 709 or the second swinging directional vector 710 maybe used as the synthesized vector. Either one the first triggeroperation strength value 726 or the second trigger operation strengthvalue 728 may be used.

The processing in steps S760, S762 and S764 is substantially the same asthat described in the fifth embodiment and will not be described here.

In step S766, the velocity vector is changed in substantially the samemanner as in step S758. It should be noted that in step S760, α=1.5.

The processing in steps S768, S770 and S772 is substantially the same asthat described in the fifth embodiment and will not be described here.

The processing in FIG. 51 and FIG. 52 is apparent to those skilled inthe art based on the description regarding the flowchart in FIG. 50 andthe fifth embodiment, and will not be described here.

As described above, according to this embodiment, the player can freelymove both of his/her hands. Owing to a high degree of freedom of motionrealized by such an arrangement, a dynamic play is made possible. Sincethe player can control the character by swinging the operation units,the player can play intuitively and thus obtain a high operability. Asthe swing directions of two operation units swung simultaneously arecloser to each other, the acceleration of the character is larger.Therefore, a more intuitive operation is realized.

In this embodiment, three-axial acceleration sensors are used. Even whentwo-axial acceleration sensors are used, a direction instructionoperation is detected based on the acceleration along one of the twoaxes, and a trigger operation is detected by the acceleration along theother axis. Therefore, substantially the same effects as those of thisembodiment are provided.

In this embodiment, the motion of the character is controlled by twooperation units of the first unit and the second unit. Alternatively,the motion of the character may be controlled by performing a directioninstruction operation and a trigger operation using only one operationunit.

In this embodiment, a trigger operation is performed after a directioninstruction operation. Alternatively, a direction instruction operationmay be performed after a trigger operation. In this case, the gameprocessing may be executed as follows. When a direction instructionoperation is detected (i.e., when the outputs of Ax and Az represent adirection instruction operation), it is determined whether or not Ayrepresenting a trigger operation is found during a predetermined timeperiod before that time point, by referring to the sampling data. Whensuch Ay is found, the game processing is executed using a swingingdirectional vector provided by the direction instruction operation.Alternatively, the direction instruction operation and the triggeroperation may be performed substantially. In this case, the gameprocessing may be executed as follows. When either the directioninstruction operation or the trigger operation is detected, it may bedetermined whether or not an output representing the other operation isfound during a predetermined time period before and after that timepoint, by referring to the sampling data. When there is such an output,the game processing is executed using the swinging directional vectorprovided by the direction instruction operation.

In this embodiment, when a trigger operation is detected, it isdetermined whether or not a direction instruction operation wasperformed during a predetermined time period before that time point, byreferring to the sampling data. Alternatively, when a directioninstruction operation is detected, it may be monitored whether or not atrigger operation is performed during a predetermined time period afterthat time point.

In the above embodiments, the player controls the game object. Thepresent technology is not limited to this. For example, the inclinationof a virtual camera which is set in the virtual game world may bechanged in accordance with the output from the first acceleration sensor(inclination, etc.), and the motion of the game object may be changed inaccordance with the output from the second acceleration sensor (swingingstrength, swinging direction, etc.).

While the embodiments presented herein have been described in detail,the foregoing description is in all aspects illustrative and notrestrictive. It is understood that numerous other modifications andvariations can be devised without departing from the scope of thedisclosed embodiments.

1. A non-transitory computer-readable storage medium having storedthereon a game program for executing game control using an output from afirst sensor provided in a first housing and capable of detecting amotion or a posture and an output from a second sensor provided in asecond housing separate from the first housing and capable of detectinga motion or a posture, the game program causing a computer of a gameapparatus to perform: first game control for executing first gameprocessing in accordance with a motion detected based on an output fromthe first sensor; second game control for executing second gameprocessing in accordance with a posture detected based on an output fromthe second sensor; and reference sensor exchange for changing the sensorreferred to by the first game control for executing the first gameprocessing from the first sensor to the second sensor, and for changingthe sensor referred to by the second game control for executing thesecond game processing from the second sensor to the first sensor, inaccordance with an instruction of a player, wherein the first housingand the second housing are detached from any common fixed structure andare swung by a user in space.
 2. A computer-implemented method forexecuting game control using an output from a first sensor provided in afirst housing and capable of detecting a motion or a posture and anoutput from a second sensor provided in a second housing separate fromthe first housing and capable of detecting a motion or a posture, themethod comprising: first game control for executing, via a computerprocessor, first game processing in accordance with a motion detectedbased on an output from the first sensor; second game control forexecuting, via a computer processor, second game processing inaccordance with a posture detected based on an output from the secondsensor; and reference sensor exchanging for changing the sensor referredto by the first game control for executing the first game processingfrom the first sensor to the second sensor, and for changing the sensorreferred to by the second game control for executing the second gameprocessing from the second sensor to the first sensor, in accordancewith an instruction of a player, wherein the first housing and thesecond housing are detached from any common fixed structure and areswung by a user in space.
 3. A game apparatus configured to execute gameprocessing for executing game control using an output from a firstsensor provided in a first housing and capable of detecting a motion ora posture and an output from a second sensor provided in a secondhousing separate from the first housing and capable of detecting amotion or a posture, the game apparatus comprising: a computer processorconfigured to: execute first game processing in accordance with a motiondetected based on an output from the first sensor; execute second gameprocessing in accordance with a posture detected based on an output fromthe second sensor; and change the sensor referred to for executing thefirst game processing from the first sensor to the second sensor, andfor changing the sensor referred to for executing the second gameprocessing from the second sensor to the first sensor, in accordancewith an instruction of a player, wherein the first housing and thesecond housing are detached from any common fixed structure and areswung by a user in space.